package com.aspose.cells;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

final class zauf {
   private static float a = 0.05F;
   private static float b = 0.6F;

   static void a(zn var0, com.aspose.cells.b.a.b.zp var1, zbcq var2) throws Exception {
      zig var3 = var2.v();
      List var4 = var3.z().a(var2.ag(), new int[]{var2.m()});
      int var5 = var3.z().a(var2, var2.ag(), new int[]{var2.m()});
      if (var5 == 0) {
         com.aspose.cells.b.a.b.zp[] var6;
         switch(var2.m()) {
         case 35:
            a(var0, var3, var1, var4);
            break;
         case 36:
            b(var0, var3, var1, var4);
         case 37:
         case 38:
         case 39:
         case 40:
         case 41:
         case 42:
         case 43:
         case 45:
         case 48:
         default:
            break;
         case 44:
            a(var2.E());
            var6 = new com.aspose.cells.b.a.b.zp[]{var1};
            a(var0, var3, var6, var2);
            var1 = var6[0];
            b(var0, var3, var1, var2);
            break;
         case 46:
            d(var0, var3, var1, var2);
            break;
         case 47:
            a(var2.E());
            var6 = new com.aspose.cells.b.a.b.zp[]{var1};
            a(var0, var3, var6, var2);
            var1 = var6[0];
            c(var0, var3, var1, var2);
            break;
         case 49:
            e(var0, var3, var1, var2);
         }
      }

   }

   private static void b(zn var0, zig var1, com.aspose.cells.b.a.b.zp var2, zbcq var3) throws Exception {
      int var4 = var3.aj();
      double var5 = 0.0D;
      zjg var7 = var3.E();

      for(int var8 = 0; var8 < var7.getCount(); ++var8) {
         var5 += Math.abs(var7.a(var8).v());
      }

      if (var5 != 0.0D) {
         double var44 = (double)((float)var3.V() - 90.0F);
         double var10 = 0.0D;
         double var12 = (double)(90 - var3.V());
         com.aspose.cells.b.a.b.a.ze var14 = new com.aspose.cells.b.a.b.a.ze();
         ArrayList var15 = new ArrayList();
         double var16 = (double)var2.e() / 2.0D / (double)(1.0F + var3.ay() / 100.0F);
         double var18 = (double)var2.c() + (double)var2.e() / 2.0D;
         double var20 = (double)var2.d() + (double)var2.f() / 2.0D;
         com.aspose.cells.b.a.b.zq var22 = new com.aspose.cells.b.a.b.zq((float)(var18 - var16), (float)(var20 - var16), (float)(2.0D * var16), (float)(2.0D * var16));

         com.aspose.cells.b.a.b.zo var25;
         for(int var23 = 0; var23 < var7.getCount(); ++var23) {
            zje var24 = var7.b(var23);
            var10 = a(var7.a(var23).v(), var5);
            var25 = new com.aspose.cells.b.a.b.zo((float)var18, (float)var20);
            com.aspose.cells.b.a.b.a.ze var26;
            if (var24.E() > 0.0F) {
               var25 = a(var24, var22, var44, (double)((float)(var10 == 0.0D ? 0.01D : var10)), var12);
               var26 = new com.aspose.cells.b.a.b.a.ze();
               var26.b(var22.f(), var22.g(), var22.h(), var22.i(), (float)var44, (float)(var10 == 0.0D ? 0.01D : var10));
               var24.i().a(var26);
               var14.a(var26, false);
               com.aspose.cells.b.a.a.ze.a(var15, (Object)var26);
               var0.d();
            } else {
               var26 = new com.aspose.cells.b.a.b.a.ze();
               var26.b(var22.f(), var22.g(), var22.h(), var22.i(), (float)var44, (float)(var10 == 0.0D ? 0.01D : var10));
               var24.i().a(var26);
               var14.a(var26, false);
               com.aspose.cells.b.a.a.ze.a(var15, (Object)var26);
            }

            var24.a(new com.aspose.cells.b.a.b.zq(var25.d(), var25.e(), (float)var16, (float)var16));
            var24.b((float)var44);
            var24.c((float)(var44 + var10));
            var44 += var10;
            var12 -= var10;
         }

         var44 = (double)((float)var3.V() - 90.0F);
         var10 = 0.0D;
         com.aspose.cells.b.a.b.zo var45 = com.aspose.cells.b.a.b.zo.a();
         com.aspose.cells.b.a.b.zo var46 = com.aspose.cells.b.a.b.zo.a();
         var25 = new com.aspose.cells.b.a.b.zo((float)var18, (float)var20);
         var12 = (double)(90 - var3.V());
         boolean var47 = false;

         for(int var27 = 0; var27 < var7.getCount(); ++var27) {
            zje var28 = var7.b(var27);
            var10 = a(var7.a(var27).v(), var5);
            if (var27 == 0) {
               var45 = a(var18, var20, var12, var16);
            }

            var46 = a(var18, var20, var12 - var10, var16);
            if (var28.E() > 0.0F) {
               a(var28, var22, var44, (double)((float)(var10 == 0.0D ? 0.01D : var10)), var12);
            }

            if (var10 == 0.0D) {
               var10 = 0.009999999776482582D;
            }

            com.aspose.cells.b.a.b.a.ze var29 = new com.aspose.cells.b.a.b.a.ze();
            if (var10 == 360.0D) {
               var29.a(var22, (float)var44, (float)var10);
            } else {
               var29.a(var25, var45);
               var29.a(var22, (float)var44, (float)var10);
               var29.a(var46, var25);
            }

            var28.k().a(var29);
            if (!var47 && var28.k().m() && var28.E() <= 0.0F) {
               var0.a((com.aspose.cells.b.a.b.zc)(new com.aspose.cells.b.a.b.zu(var28.k().a())), var25.d() - 0.5F, var25.e() - 0.5F, 1.0F, 1.0F, 0.0F, 360.0F);
               var47 = true;
            }

            if (var28.E() > 0.0F) {
               var0.d();
            }

            var44 += var10;
            var12 -= var10;
            var45 = var46;
         }

         var44 = (double)(90.0F - (float)var3.V());
         var10 = 0.0D;
         float var48 = (float)(var16 * (double)a);
         com.aspose.cells.b.a.b.zq var49 = com.aspose.cells.a.c.zn.a(var14);

         for(int var50 = 0; var50 < var7.getCount(); ++var50) {
            zje var30 = var7.b(var50);
            zpu var31 = var30.o();
            if (var31.c()) {
               double var32 = var5 == 0.0D ? 0.0D : var30.v() / var5;
               var10 = a(var30.v(), var5);
               double var34 = (var44 - var10 / 2.0D) * 3.141592653589793D / 180.0D % 6.283185307179586D;
               double var36 = (double)(var30.E() / 100.0F);
               double var38 = (1.0D + var36) * var16 * Math.cos(var34);
               double var40 = (1.0D + var36) * var16 * Math.sin(var34);
               com.aspose.cells.b.a.b.zq var42 = var31.a;
               com.aspose.cells.b.a.b.zq[] var43 = new com.aspose.cells.b.a.b.zq[]{var42};
               var1.a(var43);
               var42 = var43[0];
               a(var0, var1, var4, var50, var32, var42, 0.0D);
               var31.d = new com.aspose.cells.b.a.b.zo((float)(var18 + var38), (float)(var20 - var40));
               if (var3.R() && !var31.e.b() && !var31.f.b()) {
                  a(var0, var49, var15, var3.S(), var42, var31.d, var48);
               }

               var44 -= var10;
            }
         }

      }
   }

   private static void a(zn var0, com.aspose.cells.b.a.b.zq var1, ArrayList var2, zalw var3, com.aspose.cells.b.a.b.zq var4, com.aspose.cells.b.a.b.zo var5, float var6) {
      com.aspose.cells.b.a.b.zo var7 = new com.aspose.cells.b.a.b.zo(var1.f() + var1.h() / 2.0F, var1.g() + var1.i() / 2.0F);
      if (var5.d() < var7.d()) {
         var5.a(var5.d() - 1.0F);
      } else {
         var5.a(var5.d() + 1.0F);
      }

      if (var5.e() < var7.e()) {
         var5.b(var5.e() - 1.0F);
      } else {
         var5.b(var5.e() + 1.0F);
      }

      com.aspose.cells.b.a.b.zo var9 = new com.aspose.cells.b.a.b.zo(var4.j(), var4.k() + var4.i() / 3.0F);
      com.aspose.cells.b.a.b.zo var10 = new com.aspose.cells.b.a.b.zo(var4.j() + var4.h() / 3.0F, var4.k());
      com.aspose.cells.b.a.b.zo var11 = new com.aspose.cells.b.a.b.zo(var4.l(), var4.k() + var4.i() / 3.0F);
      com.aspose.cells.b.a.b.zo var12 = new com.aspose.cells.b.a.b.zo(var4.j() + var4.h() / 3.0F, var4.m());
      int var13 = a(var5, var4);
      com.aspose.cells.b.a.b.a.ze var14 = new com.aspose.cells.b.a.b.a.ze();
      com.aspose.cells.b.a.b.zo var15 = com.aspose.cells.b.a.b.zo.a();
      com.aspose.cells.b.a.b.zm var16 = null;
      com.aspose.cells.b.a.b.a.ze var17;
      switch(var13) {
      case 1:
         var15 = new com.aspose.cells.b.a.b.zo(var11.d() + var6, var11.e());
         var14.a(var11, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.d() <= var5.d()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var11, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         }
         break;
      case 2:
         var15 = new com.aspose.cells.b.a.b.zo(var11.d() + var6, var11.e());
         var14.a(var11, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.d() <= var5.d()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var11, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         } else {
            var14 = new com.aspose.cells.b.a.b.a.ze();
            var15 = new com.aspose.cells.b.a.b.zo(var12.d(), var12.e() + var6);
            var14.a(var12, var15);
            var14.a(var15, var5);
            if (var16 != null) {
               var16.a();
            }

            var16 = var3.b(var14);
            var14.a(var16);
            if (a(var0, var14, var2) && var15.e() <= var5.e()) {
               var17 = new com.aspose.cells.b.a.b.a.ze();
               var17.a(var12, var15);
               var17.a(var15, var5);
               var0.a(var16, var17);
               var17.g();
            }
         }
         break;
      case 3:
         var14 = new com.aspose.cells.b.a.b.a.ze();
         var15 = new com.aspose.cells.b.a.b.zo(var12.d(), var12.e() + var6);
         var14.a(var12, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.e() <= var5.e()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var12, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         }
         break;
      case 4:
         var14 = new com.aspose.cells.b.a.b.a.ze();
         var15 = new com.aspose.cells.b.a.b.zo(var9.d() - var6, var9.e());
         var14.a(var9, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.d() >= var5.d()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var9, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         } else {
            var14 = new com.aspose.cells.b.a.b.a.ze();
            var15 = new com.aspose.cells.b.a.b.zo(var12.d(), var12.e() + var6);
            var14.a(var12, var15);
            var14.a(var15, var5);
            if (var16 != null) {
               var16.a();
            }

            var16 = var3.b(var14);
            var14.a(var16);
            if (a(var0, var14, var2) && var15.e() <= var5.e()) {
               var17 = new com.aspose.cells.b.a.b.a.ze();
               var17.a(var12, var15);
               var17.a(var15, var5);
               var0.a(var16, var17);
               var17.g();
            }
         }
         break;
      case 5:
         var14 = new com.aspose.cells.b.a.b.a.ze();
         var15 = new com.aspose.cells.b.a.b.zo(var9.d() - var6, var9.e());
         var14.a(var9, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.d() >= var5.d()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var9, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         }
         break;
      case 6:
         var14 = new com.aspose.cells.b.a.b.a.ze();
         var15 = new com.aspose.cells.b.a.b.zo(var9.d() - var6, var9.e());
         var14.a(var9, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.d() >= var5.d()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var9, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         } else {
            var14 = new com.aspose.cells.b.a.b.a.ze();
            var15 = new com.aspose.cells.b.a.b.zo(var10.d(), var10.e() - var6);
            var14.a(var10, var15);
            var14.a(var15, var5);
            if (var16 != null) {
               var16.a();
            }

            var16 = var3.b(var14);
            var14.a(var16);
            if (a(var0, var14, var2) && var15.e() >= var5.e()) {
               var17 = new com.aspose.cells.b.a.b.a.ze();
               var17.a(var10, var15);
               var17.a(var15, var5);
               var0.a(var16, var17);
               var17.g();
            }
         }
         break;
      case 7:
         var14 = new com.aspose.cells.b.a.b.a.ze();
         var15 = new com.aspose.cells.b.a.b.zo(var10.d(), var10.e() - var6);
         var14.a(var10, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.e() >= var5.e()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var10, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         }
         break;
      case 8:
         var14 = new com.aspose.cells.b.a.b.a.ze();
         var15 = new com.aspose.cells.b.a.b.zo(var11.d() + var6, var11.e());
         var14.a(var11, var15);
         var14.a(var15, var5);
         var16 = var3.b(var14);
         var14.a(var16);
         if (a(var0, var14, var2) && var15.d() <= var5.d()) {
            var17 = new com.aspose.cells.b.a.b.a.ze();
            var17.a(var11, var15);
            var17.a(var15, var5);
            var0.a(var16, var17);
            var17.g();
         } else {
            var14 = new com.aspose.cells.b.a.b.a.ze();
            var15 = new com.aspose.cells.b.a.b.zo(var10.d(), var10.e() - var6);
            var14.a(var10, var15);
            var14.a(var15, var5);
            if (var16 != null) {
               var16.a();
            }

            var16 = var3.b(var14);
            var14.a(var16);
            if (a(var0, var14, var2) && var15.e() >= var5.e()) {
               var17 = new com.aspose.cells.b.a.b.a.ze();
               var17.a(var10, var15);
               var17.a(var15, var5);
               var0.a(var16, var17);
               var17.g();
            }
         }
      }

      if (var16 != null) {
         var16.a();
      }

   }

   private static boolean a(zn var0, com.aspose.cells.b.a.b.a.ze var1, ArrayList var2) {
      for(int var3 = 0; var3 < var2.size(); ++var3) {
         com.aspose.cells.b.a.b.a.ze var4 = (com.aspose.cells.b.a.b.a.ze)var2.get(var3);
         com.aspose.cells.b.a.b.zr var5 = new com.aspose.cells.b.a.b.zr(var1);

         try {
            var5.a(var4);
            if (!var0.a().b(var5)) {
               boolean var6 = false;
               return var6;
            }
         } finally {
            if (var5 != null) {
               var5.b();
            }

         }
      }

      return true;
   }

   private static int a(com.aspose.cells.b.a.b.zo var0, com.aspose.cells.b.a.b.zq var1) {
      boolean var2 = false;
      byte var3;
      if (var1.l() < var0.d()) {
         if (var1.m() < var0.e()) {
            var3 = 2;
         } else if (var1.k() > var0.e()) {
            var3 = 8;
         } else {
            var3 = 1;
         }
      } else if (var1.j() > var0.d()) {
         if (var1.m() < var0.e()) {
            var3 = 4;
         } else if (var1.k() > var0.e()) {
            var3 = 6;
         } else {
            var3 = 5;
         }
      } else if (var1.m() < var0.e()) {
         var3 = 3;
      } else if (var1.k() > var0.e()) {
         var3 = 7;
      } else {
         var3 = 0;
      }

      return var3;
   }

   private static com.aspose.cells.b.a.b.zo a(double var0, double var2, double var4, double var6) {
      double var8 = var4 * 3.141592653589793D / 180.0D % 6.283185307179586D;
      double var10 = var6 * Math.cos(var8);
      double var12 = var6 * Math.sin(var8);
      var10 += var0;
      var12 = var2 - var12;
      return new com.aspose.cells.b.a.b.zo((float)var10, (float)var12);
   }

   private static boolean a(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zp var1) {
      com.aspose.cells.b.a.b.zq var2 = new com.aspose.cells.b.a.b.zq((float)var1.c(), (float)var1.d(), (float)var1.e(), (float)var1.f());
      return a(var0, var2);
   }

   private static boolean a(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zq var1) {
      return var0.j() >= var1.j() && var0.l() <= var1.l() && var0.k() >= var1.k() && var0.m() <= var1.m();
   }

   private static com.aspose.cells.b.a.b.zo a(zje var0, com.aspose.cells.b.a.b.zq var1, double var2, double var4, double var6) throws Exception {
      zig var8 = var0.h();
      zn var9 = var8.ap();
      com.aspose.cells.b.a.b.zp var10 = new com.aspose.cells.b.a.b.zp(0, 0, var8.a(), var8.b());
      float var11 = var0.E();
      double var12 = (double)var1.f() + (double)var1.h() / 2.0D;
      double var14 = (double)var1.g() + (double)var1.i() / 2.0D;
      double var16 = (double)var1.h() / 2.0D;
      double var18 = var16 * (double)var11 / 100.0D;
      com.aspose.cells.b.a.b.zo var20 = a(var12, var14, var6 - var4 / 2.0D, var18);
      com.aspose.cells.b.a.b.zq var21 = new com.aspose.cells.b.a.b.zq((float)((double)var20.d() - var16), (float)((double)var20.e() - var16), var1.h(), var1.i());
      com.aspose.cells.b.a.b.zq var22 = a(var21, var2, var4);
      if (var11 > 0.0F) {
         while(!a(var22, var10) && var11 > 0.0F) {
            --var11;
            var18 = var16 * (double)var11 / 100.0D;
            var20 = a(var12, var14, var6 - var4 / 2.0D, var18);
            var21 = new com.aspose.cells.b.a.b.zq((float)((double)var20.d() - var16), (float)((double)var20.e() - var16), var1.h(), var1.i());
            var22 = a(var21, var2, var4);
         }
      } else {
         while(!a(var22, var10) && var11 < 0.0F) {
            ++var11;
            var18 = var16 * (double)var11 / 100.0D;
            var20 = a(var12, var14, var6 - var4 / 2.0D, var18);
            var21 = new com.aspose.cells.b.a.b.zq((float)((double)var20.d() - var16), (float)((double)var20.e() - var16), var1.h(), var1.i());
            var22 = a(var21, var2, var4);
         }
      }

      com.aspose.cells.b.a.b.a.zi var23 = new com.aspose.cells.b.a.b.a.zi();
      float var24 = (float)((double)var20.d() - var12);
      float var25 = (float)((double)var20.e() - var14);
      var24 = zbuk.a(var24);
      var25 = zbuk.a(var25);
      var23.b(var24, var25);
      var9.b(var23);
      return var20;
   }

   private static void c(zn var0, zig var1, com.aspose.cells.b.a.b.zp var2, zbcq var3) throws Exception {
      zbcs var4 = var1.z();
      int var5 = var3.aj();
      double var6 = 0.0D;
      zjg var8 = var3.E();

      for(int var9 = 0; var9 < var8.getCount(); ++var9) {
         var6 += Math.abs(var8.a(var9).v());
      }

      if (var6 != 0.0D) {
         double var44 = (double)var2.c() + (double)var2.e() / 2.0D;
         double var11 = (double)var2.d() + (double)var2.f() / 2.0D;
         com.aspose.cells.b.a.b.a.ze var13 = new com.aspose.cells.b.a.b.a.ze();
         ArrayList var14 = new ArrayList();
         double var15 = (double)((float)var3.V() - 90.0F);
         double var17 = 0.0D;
         double var19 = (double)(90.0F - (float)var3.V());
         double var21 = (double)var2.e() / 2.0D / (double)(1.0F + var3.ay() / 100.0F);

         zje var27;
         for(int var23 = 0; var23 < var8.getCount(); ++var23) {
            zpu var24 = var8.b(var23).o();
            var17 = a(var8.a(var23).v(), var6);
            double var25 = (var19 - var17 / 2.0D) * 3.141592653589793D / 180.0D % 6.283185307179586D;
            var27 = var8.b(var23);
            double var28 = (double)(var27.E() / 100.0F);
            double var30 = var21 * var28;
            double var32 = var30 * Math.cos(var25);
            double var34 = var30 * Math.sin(var25);
            double var36 = var44 + var32;
            double var38 = var11 - var34;
            com.aspose.cells.b.a.b.zp var40 = new com.aspose.cells.b.a.b.zp((int)(var36 - var21), (int)(var38 - var21), (int)(2.0D * var21), (int)(2.0D * var21));
            if (var17 == 0.0D) {
               var17 = 0.001D;
            }

            com.aspose.cells.b.a.b.a.ze var41 = new com.aspose.cells.b.a.b.a.ze();
            var41.a(var40, (float)var15, (float)var17);
            var13.a(var41, false);
            com.aspose.cells.b.a.a.ze.a(var14, (Object)var41);
            var27.i().a(var41);
            var27.k().a(var41);
            var27.a(new com.aspose.cells.b.a.b.zq((float)var36, (float)var38, (float)var21, (float)var21));
            var27.b((float)var15);
            var27.c((float)(var15 + var17));
            var15 += var17;
            var19 -= var17;
         }

         double var45 = (double)(90.0F - (float)var3.V());
         com.aspose.cells.b.a.b.zq var46 = com.aspose.cells.a.c.zn.a(var13);

         for(int var26 = 0; var26 < var8.getCount(); ++var26) {
            var27 = var8.b(var26);
            zpu var47 = var27.o();
            double var29 = var6 == 0.0D ? 0.0D : var27.v() / var6;
            var17 = a(var8.a(var26).v(), var6);
            double var31 = (var45 - var17 / 2.0D) % 360.0D;
            double var33 = var31 * 3.141592653589793D / 180.0D;
            var47.g = var33;
            double var35 = (double)(var27.E() / 100.0F);
            double var37 = (1.0D + var35) * var21 * Math.cos(var33);
            double var39 = (1.0D + var35) * var21 * Math.sin(var33);
            var37 += var44;
            var39 = var11 - var39;
            com.aspose.cells.b.a.b.zq var48 = var47.a;
            com.aspose.cells.b.a.b.zq[] var42 = new com.aspose.cells.b.a.b.zq[]{var48};
            var1.a(var42);
            var48 = var42[0];
            a(var0, var1, var5, var26, var29, var48, 0.0D);
            var47.d = new com.aspose.cells.b.a.b.zo((float)var37, (float)var39);
            float var43 = (float)(var21 * (double)a);
            if (var3.R() && !var47.e.b() && !var47.f.b()) {
               a(var0, var46, var14, var3.S(), var48, var47.d, var43);
            }

            var45 -= var17;
         }

      }
   }

   private static void d(zn var0, zig var1, com.aspose.cells.b.a.b.zp var2, zbcq var3) throws Exception {
      int var4 = var1.ae();
      int var5 = var1.af();
      int var6 = var1.ag();
      zje var7 = var3.u();
      int var8 = var2.e() - (2 * var4 + var6 + 2 * var5);
      int var9 = var2.c() + var8 / 2 + var4;
      int var10 = var2.d() + var2.f() / 2;
      int var11 = var2.i() - var8 / 2 - var5;
      int var12 = var10;
      zbcs var13 = var1.z();
      int var14 = var3.aj();
      zjg var15 = var3.E();
      int var16 = var15.getCount();
      boolean var17 = false;
      boolean var18 = false;
      int var72;
      int var73;
      if (var16 == 1) {
         var72 = 1;
         var73 = 1;
      } else {
         if (var3.az() != 0 && var3.aA() > 0.0D) {
            var73 = (int)var3.aA();
            if (var73 > var16) {
               var73 = var16;
            }
         } else {
            var73 = zbuk.a((double)((float)var16 / 3.0F));
         }

         var72 = var16 - var73 + 1;
      }

      double[] var19 = new double[var72];
      double[] var20 = new double[var73];
      double var21 = 0.0D;
      double var23 = 0.0D;
      double var25 = 0.0D;

      for(int var27 = 0; var27 < var16; ++var27) {
         if (var27 + 1 < var72) {
            var19[var27 + 1] = Math.abs(var15.a(var27).v());
            var21 += var19[var27 + 1];
         } else {
            var20[var27 + 1 - var72] = Math.abs(var15.a(var27).v());
            var23 += var20[var27 + 1 - var72];
         }

         var25 += Math.abs(var15.a(var27).v());
      }

      var19[0] = var23;
      var21 += var23;
      double var74 = var21 == 0.0D ? 0.0D : -Math.abs(var19[0]) / var21 * 360.0D / 2.0D;
      if (var72 == 1) {
         var74 = 0.0D;
      }

      double var29 = 0.0D;
      double var31 = (double)var4 / (double)(1.0F + var3.ay() / 100.0F);
      com.aspose.cells.b.a.b.zq var33 = new com.aspose.cells.b.a.b.zq((float)((double)var9 - var31), (float)((double)var10 - var31), (float)(2.0D * var31), (float)(2.0D * var31));
      double var34 = -var74;

      int var36;
      zje var37;
      for(var36 = 0; var36 < var19.length; ++var36) {
         var37 = null;
         if (var19[var36] != 0.0D) {
            if (var36 == 0) {
               if (var7 != null) {
                  Color[] var38 = var1.Z().a().a(var1.R(), var16 + 1);
                  Color var39 = var38[var16];
                  var7.i().c(var39);
                  var37 = var7;
               }
            } else {
               var37 = var15.b(var36 - 1);
            }

            var29 = a(var19[var36], var21);
            if (var29 == 0.0D) {
               var29 = 0.001D;
            }

            com.aspose.cells.b.a.b.zo var76 = new com.aspose.cells.b.a.b.zo((float)var9, (float)var10);
            if (var37.E() > 0.0F) {
               var76 = a(var37, var33, var74, (double)((float)(var29 == 0.0D ? 0.01D : var29)), var34);
            }

            com.aspose.cells.b.a.b.a.ze var77 = new com.aspose.cells.b.a.b.a.ze();
            var77.b(var33.f(), var33.g(), var33.h(), var33.i(), (float)var74, (float)var29);
            var37.i().a(var77);
            if (var37.E() > 0.0F) {
               var0.d();
            }

            var37.a(new com.aspose.cells.b.a.b.zq(var76.d(), var76.e(), var33.h() / 2.0F, var33.i() / 2.0F));
            var37.b((float)var74);
            var37.c((float)(var74 + var29));
            var74 += var29;
            var34 -= var29;
         }
      }

      var74 = var21 == 0.0D ? 0.0D : -Math.abs(var19[0]) / var21 * 360.0D / 2.0D;
      if (var72 == 1) {
         var74 = 0.0D;
      }

      var34 = -var74;

      for(var36 = 0; var36 < var19.length; ++var36) {
         var37 = null;
         if (var19[var36] != 0.0D) {
            if (var36 == 0) {
               if (var7 != null) {
                  var37 = var7;
               }
            } else {
               var37 = var15.b(var36 - 1);
            }

            var29 = a(var19[var36], var21);
            if (var29 == 0.0D) {
               var29 = 0.001D;
            }

            if (var37.E() > 0.0F) {
               a(var37, var33, var74, (double)((float)(var29 == 0.0D ? 0.01D : var29)), var34);
            }

            com.aspose.cells.b.a.b.a.ze var78 = new com.aspose.cells.b.a.b.a.ze();
            if (var29 == 360.0D) {
               var78.a(var33, (float)var74, (float)var29);
            } else {
               var78.b(var33.f(), var33.g(), var33.h(), var33.i(), (float)var74, (float)var29);
            }

            var37.k().a(var78);
            if (var37.E() > 0.0F) {
               var0.d();
            }

            var74 += var29;
            var34 -= var29;
         }
      }

      var74 = var21 == 0.0D ? 0.0D : Math.abs(var19[0]) / var21 * 360.0D / 2.0D;
      if (var72 == 1) {
         var74 = 0.0D;
      }

      double var75 = (double)var5 / (double)(1.0F + var3.ay() / 100.0F);
      com.aspose.cells.b.a.b.zq var79 = new com.aspose.cells.b.a.b.zq((float)((double)var11 - var75), (float)((double)var10 - var75), (float)(2.0D * var75), (float)(2.0D * var75));
      var34 = -var74;

      for(int var80 = 0; var80 < var20.length; ++var80) {
         if (var20[var80] != 0.0D) {
            int var40 = var19.length - 1 + var80;
            zje var41 = var15.b(var40);
            var29 = a(var20[var80], var23);
            if (var29 == 0.0D) {
               var29 = 0.001D;
            }

            com.aspose.cells.b.a.b.zo var42 = new com.aspose.cells.b.a.b.zo((float)var11, (float)var12);
            if (var41.E() > 0.0F) {
               var42 = a(var41, var79, var74, (double)((float)(var29 == 0.0D ? 0.01D : var29)), var34);
            }

            com.aspose.cells.b.a.b.a.ze var43 = new com.aspose.cells.b.a.b.a.ze();
            var43.b(var79.f(), var79.g(), var79.h(), var79.i(), (float)var74, (float)var29);
            var41.i().a(var43);
            if (var41.E() > 0.0F) {
               var0.d();
            }

            var41.a(new com.aspose.cells.b.a.b.zq(var42.d(), var42.e(), var79.h() / 2.0F, var79.i() / 2.0F));
            var41.b((float)var74);
            var41.c((float)(var74 + var29));
            var74 += var29;
            var34 -= var29;
         }
      }

      var74 = var21 == 0.0D ? 0.0D : Math.abs(var19[0]) / var21 * 360.0D / 2.0D;
      if (var72 == 1) {
         var74 = 0.0D;
      }

      var34 = -var74;
      double[] var81 = new double[var20.length];
      double[] var82 = new double[var20.length];

      for(int var83 = 0; var83 < var20.length; ++var83) {
         if (var20[var83] != 0.0D) {
            int var85 = var19.length - 1 + var83;
            zje var86 = var15.b(var85);
            var29 = a(var20[var83], var23);
            if (var29 == 0.0D) {
               var29 = 0.001D;
            }

            if (var86.E() > 0.0F) {
               a(var86, var79, var74, (double)((float)(var29 == 0.0D ? 0.01D : var29)), var34);
            }

            com.aspose.cells.b.a.b.a.ze var44 = new com.aspose.cells.b.a.b.a.ze();
            if (var29 == 360.0D) {
               var44.a(var79, (float)var74, (float)var29);
            } else {
               var44.b(var79.f(), var79.g(), var79.h(), var79.i(), (float)var74, (float)var29);
            }

            var86.k().a(var44);
            if (var86.E() > 0.0F) {
               var0.d();
            }

            var81[var83] = var74;
            var82[var83] = var29;
            var74 += var29;
            var34 -= var29;
         }
      }

      float var47;
      double var50;
      double var84;
      if (var3.Y() && var21 != 0.0D) {
         if (Math.abs(var19[0]) / var21 * 360.0D > 180.0D) {
            var84 = Math.acos((var31 - var75) / (double)(var11 - var9));
            com.aspose.cells.b.a.b.zo var87 = new com.aspose.cells.b.a.b.zo((float)((double)var9 + var31 * Math.cos(var84)), (float)((double)var10 - var31 * Math.sin(var84)));
            com.aspose.cells.b.a.b.zo var90 = new com.aspose.cells.b.a.b.zo((float)((double)var11 + var75 * Math.cos(var84)), (float)((double)var12 - var75 * Math.sin(var84)));
            com.aspose.cells.b.a.b.zo var45 = new com.aspose.cells.b.a.b.zo((float)((double)var9 + var31 * Math.cos(-var84)), (float)((double)var10 - var31 * Math.sin(-var84)));
            com.aspose.cells.b.a.b.zo var46 = new com.aspose.cells.b.a.b.zo((float)((double)var11 + var75 * Math.cos(-var84)), (float)((double)var12 - var75 * Math.sin(-var84)));
            if (var7.E() > 0.0F) {
               var47 = (float)(var31 * (double)var7.E() / 100.0D);
               var87.a(var87.d() + var47);
               var45.a(var45.d() + var47);
            }

            int var94 = a(var81, var82, var84 * 180.0D / 3.141592653589793D);
            zje var48 = var3.E().b(var19.length - 1 + var94);
            float var49;
            if (var48.E() > 0.0F) {
               var49 = (float)(var75 * (double)var48.E() / 100.0D);
               var50 = (360.0D - var81[var94] - var82[var94] / 2.0D) * 3.141592653589793D / 180.0D % 6.283185307179586D;
               var46.a(var46.d() + (float)((double)var49 * Math.cos(var50)));
               var46.b(var46.e() - (float)((double)var49 * Math.sin(var50)));
            }

            var94 = a(var81, var82, 360.0D - var84 * 180.0D / 3.141592653589793D);
            var48 = var3.E().b(var19.length - 1 + var94);
            if (var48.E() > 0.0F) {
               var49 = (float)(var75 * (double)var48.E() / 100.0D);
               var50 = (360.0D - var81[var94] - var82[var94] / 2.0D) * 3.141592653589793D / 180.0D % 6.283185307179586D;
               var90.a(var90.d() + (float)((double)var49 * Math.cos(var50)));
               var90.b(var90.e() - (float)((double)var49 * Math.sin(var50)));
            }

            var3.Z().a(var87, var90);
            var3.Z().a(var45, var46);
         } else {
            var74 = var21 == 0.0D ? 0.0D : Math.abs(var19[0]) / var21 * 3.141592653589793D;
            if (var72 == 1) {
               var74 = 0.0D;
            }

            double var88 = (double)var9 + var31 * Math.cos(var74);
            double var92 = (double)var10 - var31 * Math.sin(var74);
            double var95 = Math.sqrt(Math.pow(var92 - (double)var12, 2.0D) + Math.pow(var88 - (double)var11, 2.0D));
            var84 = Math.acos(((double)var11 - var88) / var95) + Math.acos(var75 / var95);
            com.aspose.cells.b.a.b.zo var97 = new com.aspose.cells.b.a.b.zo((float)var88, (float)var92);
            com.aspose.cells.b.a.b.zo var99 = new com.aspose.cells.b.a.b.zo((float)((double)var11 + var75 * Math.cos(3.141592653589793D - var84)), (float)((double)var12 - var75 * Math.sin(3.141592653589793D - var84)));
            com.aspose.cells.b.a.b.zo var51 = new com.aspose.cells.b.a.b.zo((float)((double)var9 + var31 * Math.cos(-var74)), (float)((double)var10 - var31 * Math.sin(-var74)));
            com.aspose.cells.b.a.b.zo var52 = new com.aspose.cells.b.a.b.zo((float)((double)var11 + var75 * Math.cos(var84 + 3.141592653589793D)), (float)((double)var12 - var75 * Math.sin(var84 + 3.141592653589793D)));
            if (var7.E() > 0.0F) {
               float var53 = (float)(var31 * (double)var7.E() / 100.0D);
               var97.a(var97.d() + var53);
               var51.a(var51.d() + var53);
            }

            int var101 = a(var81, var82, var84 * 180.0D / 3.141592653589793D);
            zje var54 = var3.E().b(var19.length - 1 + var101);
            float var55;
            double var56;
            if (var54.E() > 0.0F) {
               var55 = (float)(var75 * (double)var54.E() / 100.0D);
               var56 = (360.0D - var81[var101] - var82[var101] / 2.0D) * 3.141592653589793D / 180.0D % 6.283185307179586D;
               var52.a(var52.d() + (float)((double)var55 * Math.cos(var56)));
               var52.b(var52.e() - (float)((double)var55 * Math.sin(var56)));
            }

            var101 = a(var81, var82, 360.0D - var84 * 180.0D / 3.141592653589793D);
            var54 = var3.E().b(var19.length - 1 + var101);
            if (var54.E() > 0.0F) {
               var55 = (float)(var75 * (double)var54.E() / 100.0D);
               var56 = (360.0D - var81[var101] - var82[var101] / 2.0D) * 3.141592653589793D / 180.0D % 6.283185307179586D;
               var99.a(var99.d() + (float)((double)var55 * Math.cos(var56)));
               var99.b(var99.e() - (float)((double)var55 * Math.sin(var56)));
            }

            var3.Z().a(var97, var99);
            var3.Z().a(var51, var52);
         }
      }

      zpu var89 = var3.w();
      var74 = var21 == 0.0D ? 0.0D : Math.abs(var19[0]) / var21 * 180.0D;
      double var91 = -var74;
      if (var72 == 1) {
         var74 = 0.0D;
      }

      var29 = 0.0D;
      var47 = (float)var1.b();

      for(int var96 = 0; var96 < var19.length + var20.length; ++var96) {
         zje var98 = null;
         var50 = 0.0D;
         if (var96 == 0) {
            if (var7 != null) {
               var98 = var7;
            }
         } else {
            var98 = var15.b(var96 - 1);
         }

         if (var98 != null) {
            var89 = var98.o();
            var50 = (double)(var98.E() / 100.0F);
         }

         float var93;
         if (var89.a().d().g()) {
            var93 = (float)var1.a() * 0.175F;
         } else {
            var93 = (float)var1.a() * 0.2F;
         }

         double var100 = var19[0];
         new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
         com.aspose.cells.b.a.b.zt var102 = a(var0, var1.z(), var14, var96 - 1, var100, var93, var47, var19[0]);
         double var103 = 0.0D;
         double var57 = 0.0D;
         double var59 = 0.0D;
         double var61;
         if (var96 < var72) {
            var100 = var25 == 0.0D ? 0.0D : var19[var96] / var25;
            var29 = var21 == 0.0D ? 0.0D : var19[var96] / var21 * 360.0D;
            var61 = var31;
            var59 = var31 * var50;
         } else {
            var100 = var25 == 0.0D ? 0.0D : var20[var96 - var72] / var25;
            if (var96 == var72) {
               var74 = var21 == 0.0D ? 0.0D : -Math.abs(var19[0]) / var21 * 180.0D;
               var91 = -var74;
               if (var72 == 1) {
                  var74 = 0.0D;
               }
            }

            var29 = var23 == 0.0D ? 0.0D : var20[var96 - var72] / var23 * 360.0D;
            var61 = var75;
            var59 = var75 * var50;
         }

         if (var29 != 0.0D) {
            double var63 = (var74 - var29 / 2.0D) % 360.0D;
            var84 = var63 * 3.141592653589793D / 180.0D;
            boolean var65 = false;
            int var66 = var89.j();

            com.aspose.cells.b.a.b.zq var104;
            while(!var65) {
               double var67;
               double[] var69;
               double[] var70;
               switch(var66) {
               case 1:
                  var67 = var59 + var61 * 0.5D;
                  var103 = var67 * Math.cos(var84);
                  var57 = var67 * Math.sin(var84);
                  var103 -= (double)(var102.b() / 2.0F);
                  var57 += (double)(var102.c() / 2.0F);
                  var65 = true;
                  break;
               case 2:
               case 5:
               case 6:
               case 7:
               case 8:
               default:
                  var67 = var59 + var61 * 0.96D;
                  var103 = var67 * Math.cos(var84);
                  var57 = var67 * Math.sin(var84);
                  var69 = new double[]{var103};
                  var70 = new double[]{var57};
                  b(var69, var70, var63, var102);
                  var103 = var69[0];
                  var57 = var70[0];
                  var104 = new com.aspose.cells.b.a.b.zq((float)var103, (float)var57, var102.b(), var102.c());
                  boolean var105 = a(var0, (float)var91, (float)var74, (float)var29, (float)var61, (float)var59, var104, var89);
                  if (var105) {
                     var65 = true;
                  } else {
                     com.aspose.cells.b.a.b.zo var71 = a(var0, (float)var91, (float)var74, (float)var29, (float)var61, (float)var59, var102, var89);
                     if (var71.b()) {
                        var65 = false;
                        var66 = 4;
                     } else {
                        var103 = (double)var71.d();
                        var57 = (double)var71.e();
                        var65 = true;
                     }
                  }
                  break;
               case 3:
                  var67 = var59 + var61 * 0.96D;
                  var103 = var67 * Math.cos(var84);
                  var57 = var67 * Math.sin(var84);
                  var69 = new double[]{var103};
                  var70 = new double[]{var57};
                  b(var69, var70, var63, var102);
                  var103 = var69[0];
                  var57 = var70[0];
                  var65 = true;
                  break;
               case 4:
                  var67 = var59 + var61 * 1.04D;
                  var103 = var67 * Math.cos(var84);
                  var57 = var67 * Math.sin(var84);
                  var69 = new double[]{var103};
                  var70 = new double[]{var57};
                  a(var69, var70, var63, var102);
                  var103 = var69[0];
                  var57 = var70[0];
                  var65 = true;
                  break;
               case 9:
                  var67 = var59 + var61 * 1.04D;
                  var103 = var67 * Math.cos(var84);
                  var57 = var67 * Math.sin(var84);
                  var69 = new double[]{var103};
                  var70 = new double[]{var57};
                  a(var69, var70, var63, var102);
                  var103 = var69[0];
                  var57 = var70[0];
                  var65 = true;
               }
            }

            if (var96 < var72) {
               var103 += (double)var9;
               var57 = (double)var10 - var57;
            } else {
               var103 += (double)var11;
               var57 = (double)var12 - var57;
            }

            if (var89.j() == 9) {
               var89.a().b = new com.aspose.cells.b.a.b.zp(zbuk.a(var103), zbuk.a(var57), zbuk.a((double)var102.b()), zbuk.a((double)var102.c()));
               var89.a().z();
               var103 = (double)var89.a().a.c();
               var57 = (double)var89.a().a.d();
            }

            var104 = new com.aspose.cells.b.a.b.zq((float)var103, (float)var57, var102.b(), var102.c());
            a(var0, var1, var14, var96 - 1, var100, var104, var19[0]);
            var74 -= var29;
            var91 += var29;
         }
      }

   }

   private static int a(double[] var0, double[] var1, double var2) {
      int var4;
      for(var4 = 0; var4 < var0.length; ++var4) {
         if (var2 > var0[var4] % 360.0D && var2 <= var0[var4] + var1[var4] % 360.0D) {
            return var4;
         }
      }

      var2 += 360.0D;

      for(var4 = 0; var4 < var0.length; ++var4) {
         if (var2 > var0[var4] % 360.0D && var2 <= var0[var4] + var1[var4] % 360.0D) {
            return var4;
         }
      }

      return 0;
   }

   private static void e(zn var0, zig var1, com.aspose.cells.b.a.b.zp var2, zbcq var3) throws Exception {
      int var4 = var1.ae();
      int var5 = var1.af();
      int var6 = var1.ag();
      zje var7 = var3.u();
      int var8 = var2.e() - (2 * var4 + var6 + var5);
      int var9 = var2.c() + var8 / 2 + var4;
      int var10 = var2.d() + var2.f() / 2;
      int var11 = var2.i() - var8 / 2 - var5;
      zbcs var13 = var1.z();
      int var14 = var3.aj();
      zjg var15 = var3.E();
      int var16 = var15.getCount();
      boolean var17 = false;
      boolean var18 = false;
      int var69;
      int var70;
      if (var16 == 1) {
         var69 = 1;
         var70 = 1;
      } else {
         if (var3.az() != 0 && var3.aA() > 0.0D) {
            var70 = (int)var3.aA();
            if (var70 > var16) {
               var70 = var16;
            }
         } else {
            var70 = zbuk.a((double)((float)var16 / 3.0F));
         }

         var69 = var16 - var70 + 1;
      }

      double[] var19 = new double[var69];
      double[] var20 = new double[var70];
      double var21 = 0.0D;
      double var23 = 0.0D;
      double var25 = 0.0D;

      for(int var27 = 0; var27 < var16; ++var27) {
         if (var27 + 1 < var69) {
            var19[var27 + 1] = Math.abs(var15.a(var27).v());
            var21 += var19[var27 + 1];
         } else {
            var20[var27 + 1 - var69] = Math.abs(var15.a(var27).v());
            var23 += var20[var27 + 1 - var69];
         }

         var25 += Math.abs(var15.a(var27).v());
      }

      var19[0] = var23;
      var21 += var23;
      double var71 = var21 == 0.0D ? 0.0D : -Math.abs(var19[0]) / var21 * 360.0D / 2.0D;
      if (var69 == 1) {
         var71 = 0.0D;
      }

      double var29 = 0.0D;
      double var31 = (double)var4 / (double)(1.0F + var3.ay() / 100.0F);
      com.aspose.cells.b.a.b.zq var33 = new com.aspose.cells.b.a.b.zq((float)((double)var9 - var31), (float)((double)var10 - var31), (float)(2.0D * var31), (float)(2.0D * var31));
      double var34 = -var71;

      int var36;
      zje var37;
      for(var36 = 0; var36 < var19.length; ++var36) {
         var37 = null;
         if (var19[var36] != 0.0D) {
            if (var36 == 0) {
               if (var7 != null) {
                  Color[] var38 = var1.Z().a().a(var1.R(), var16 + 1);
                  Color var39 = var38[var16];
                  var7.i().c(var39);
                  var37 = var7;
               }
            } else {
               var37 = var15.b(var36 - 1);
            }

            var29 = a(var19[var36], var21);
            if (var29 == 0.0D) {
               var29 = 0.001D;
            }

            com.aspose.cells.b.a.b.zo var73 = new com.aspose.cells.b.a.b.zo((float)var9, (float)var10);
            if (var37.E() > 0.0F) {
               var73 = a(var37, var33, var71, (double)((float)(var29 == 0.0D ? 0.01D : var29)), var34);
            }

            com.aspose.cells.b.a.b.a.ze var74 = new com.aspose.cells.b.a.b.a.ze();
            var74.b(var33.f(), var33.g(), var33.h(), var33.i(), (float)var71, (float)var29);
            var37.i().a(var74);
            if (var37.E() > 0.0F) {
               var0.d();
            }

            var37.a(new com.aspose.cells.b.a.b.zq(var73.d(), var73.e(), var33.h() / 2.0F, var33.i() / 2.0F));
            var37.b((float)var71);
            var37.c((float)(var71 + var29));
            var71 += var29;
            var34 -= var29;
         }
      }

      var71 = var21 == 0.0D ? 0.0D : -Math.abs(var19[0]) / var21 * 360.0D / 2.0D;
      if (var69 == 1) {
         var71 = 0.0D;
      }

      var34 = -var71;

      for(var36 = 0; var36 < var19.length; ++var36) {
         var37 = null;
         if (var19[var36] != 0.0D) {
            if (var36 == 0) {
               if (var7 != null) {
                  var37 = var7;
               }
            } else {
               var37 = var15.b(var36 - 1);
            }

            var29 = a(var19[var36], var21);
            if (var29 == 0.0D) {
               var29 = 0.001D;
            }

            if (var37.E() > 0.0F) {
               a(var37, var33, var71, (double)((float)(var29 == 0.0D ? 0.01D : var29)), var34);
            }

            com.aspose.cells.b.a.b.a.ze var75 = new com.aspose.cells.b.a.b.a.ze();
            if (var29 == 360.0D) {
               var75.a(var33, (float)var71, (float)var29);
            } else {
               var75.b(var33.f(), var33.g(), var33.h(), var33.i(), (float)var71, (float)var29);
            }

            var37.k().a(var75);
            if (var37.E() > 0.0F) {
               var0.d();
            }

            var71 += var29;
            var34 -= var29;
         }
      }

      double var72 = (double)(var10 - var5);

      double var76;
      for(int var40 = 0; var40 < var20.length; ++var40) {
         if (var20[var40] != 0.0D) {
            int var41 = var19.length - 1 + var40;
            zje var42 = var15.b(var41);
            var76 = Math.abs(var20[var40]) / var23 * 2.0D * (double)var5;
            com.aspose.cells.b.a.b.zq var43 = new com.aspose.cells.b.a.b.zq((float)var11, (float)var72, (float)var5, (float)var76);
            var42.i().a(var43);
            var42.k().a(var43);
            var42.a(new com.aspose.cells.b.a.b.zq(var43.f(), var43.g(), var43.h(), var43.i()));
            var72 += var76;
         }
      }

      double var77;
      if (var3.Y() && var21 != 0.0D) {
         com.aspose.cells.b.a.b.zo var78 = new com.aspose.cells.b.a.b.zo((float)var11, (float)(var10 - var5));
         com.aspose.cells.b.a.b.zo var80 = new com.aspose.cells.b.a.b.zo((float)var11, (float)(var10 + var5));
         if (Math.abs(var19[0]) / var21 * 2.0D * 3.141592653589793D > 3.141592653589793D) {
            double var10000;
            if (var21 == 0.0D) {
               var10000 = 0.0D;
            } else {
               var10000 = Math.abs(var19[0]) / var21 * 3.141592653589793D;
            }

            if (var69 == 1) {
               var71 = 0.0D;
            }

            double var44 = Math.sqrt(Math.pow((double)(var10 - var10), 2.0D) + Math.pow((double)(var11 - var9), 2.0D));
            var77 = Math.acos(var31 / var44) + Math.asin((double)var5 / var44);
            com.aspose.cells.b.a.b.zo var46 = new com.aspose.cells.b.a.b.zo((float)((double)var9 + var31 * Math.cos(var77)), (float)((double)var10 - var31 * Math.sin(var77)));
            com.aspose.cells.b.a.b.zo var47 = new com.aspose.cells.b.a.b.zo((float)((double)var9 + var31 * Math.cos(-var77)), (float)((double)var10 - var31 * Math.sin(-var77)));
            if (var7.E() > 0.0F) {
               float var48 = (float)(var31 * (double)var7.E() / 100.0D);
               var46.a(var46.d() + var48);
               var47.a(var47.d() + var48);
            }

            var3.Z().a(var46, var78);
            var3.Z().a(var47, var80);
         } else {
            var77 = Math.abs(var19[0]) / var21 * 3.141592653589793D;
            com.aspose.cells.b.a.b.zo var82 = new com.aspose.cells.b.a.b.zo((float)((double)var9 + var31 * Math.cos(var77)), (float)((double)var10 - var31 * Math.sin(var77)));
            com.aspose.cells.b.a.b.zo var45 = new com.aspose.cells.b.a.b.zo((float)((double)var9 + var31 * Math.cos(-var77)), (float)((double)var10 - var31 * Math.sin(-var77)));
            if (var7.E() > 0.0F) {
               float var84 = (float)(var31 * (double)var7.E() / 100.0D);
               var82.a(var82.d() + var84);
               var45.a(var45.d() + var84);
            }

            var3.Z().a(var82, var78);
            var3.Z().a(var45, var80);
         }
      }

      zpu var79 = var3.w();
      double var81 = var19[0];
      new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
      double var85 = 0.0D;
      double var86 = 0.0D;
      var71 = var21 == 0.0D ? 0.0D : Math.abs(var19[0]) / var21 * 180.0D;
      double var50 = -var71;
      if (var69 == 1) {
         var71 = 0.0D;
      }

      var29 = 0.0D;
      float var53 = (float)var1.b();

      float var52;
      int var54;
      zje var55;
      com.aspose.cells.b.a.b.zt var83;
      for(var54 = 0; var54 < var19.length; ++var54) {
         if (var19[var54] != 0.0D) {
            var55 = null;
            double var56 = 0.0D;
            if (var54 == 0) {
               if (var7 != null) {
                  var55 = var7;
               }
            } else {
               var55 = var15.b(var54 - 1);
            }

            if (var55 != null) {
               var79 = var55.o();
               var56 = (double)(var55.E() / 100.0F);
            }

            if (var79.a().d().g()) {
               var52 = (float)var1.a() * 0.175F;
            } else {
               var52 = (float)var1.a() * 0.2F;
            }

            var83 = a(var0, var1.z(), var14, var54 - 1, var81, var52, var53, var19[0]);
            var81 = var25 == 0.0D ? 0.0D : var19[var54] / var25;
            var29 = var21 == 0.0D ? 0.0D : var19[var54] / var21 * 360.0D;
            double var58 = (double)var4 * var56;
            double var60 = (var71 - var29 / 2.0D) % 360.0D;
            var77 = var60 * 3.141592653589793D / 180.0D;
            boolean var62 = false;
            int var63 = var79.j();
            var85 = 0.0D;
            var86 = 0.0D;

            com.aspose.cells.b.a.b.zq var89;
            while(!var62) {
               double var64;
               double[] var66;
               double[] var67;
               switch(var63) {
               case 1:
                  var64 = var58 + var31 * 0.5D;
                  var85 = var64 * Math.cos(var77);
                  var86 = var64 * Math.sin(var77);
                  var85 -= (double)(var83.b() / 2.0F);
                  var86 += (double)(var83.c() / 2.0F);
                  var62 = true;
                  break;
               case 2:
               case 5:
               case 6:
               case 7:
               case 8:
               default:
                  var64 = var58 + var31 * 0.96D;
                  var85 = var64 * Math.cos(var77);
                  var86 = var64 * Math.sin(var77);
                  var66 = new double[]{var85};
                  var67 = new double[]{var86};
                  b(var66, var67, var60, var83);
                  var85 = var66[0];
                  var86 = var67[0];
                  var89 = new com.aspose.cells.b.a.b.zq((float)var85, (float)var86, var83.b(), var83.c());
                  boolean var90 = a(var0, (float)var50, (float)var71, (float)var29, (float)var4, (float)var58, var89, var79);
                  if (var90) {
                     var62 = true;
                  } else {
                     com.aspose.cells.b.a.b.zo var68 = a(var0, (float)var50, (float)var71, (float)var29, (float)var4, (float)var58, var83, var79);
                     if (var68.b()) {
                        var62 = false;
                        var63 = 4;
                     } else {
                        var85 = (double)var68.d();
                        var86 = (double)var68.e();
                        var62 = true;
                     }
                  }
                  break;
               case 3:
                  var64 = var58 + var31 * 0.96D;
                  var85 = var64 * Math.cos(var77);
                  var86 = var64 * Math.sin(var77);
                  var66 = new double[]{var85};
                  var67 = new double[]{var86};
                  b(var66, var67, var60, var83);
                  var85 = var66[0];
                  var86 = var67[0];
                  var62 = true;
                  break;
               case 4:
                  var64 = var58 + var31 * 1.04D;
                  var85 = var64 * Math.cos(var77);
                  var86 = var64 * Math.sin(var77);
                  var66 = new double[]{var85};
                  var67 = new double[]{var86};
                  a(var66, var67, var60, var83);
                  var85 = var66[0];
                  var86 = var67[0];
                  var62 = true;
                  break;
               case 9:
                  var64 = var58 + var31 * 1.04D;
                  var85 = var64 * Math.cos(var77);
                  var86 = var64 * Math.sin(var77);
                  var66 = new double[]{var85};
                  var67 = new double[]{var86};
                  a(var66, var67, var60, var83);
                  var85 = var66[0];
                  var86 = var67[0];
                  var62 = true;
               }
            }

            var85 += (double)var9;
            var86 = (double)var10 - var86;
            if (var79.j() == 9) {
               var79.a().b = new com.aspose.cells.b.a.b.zp(zbuk.a(var85), zbuk.a(var86), zbuk.a((double)var83.b()), zbuk.a((double)var83.c()));
               var79.a().z();
               var85 = (double)var79.a().a.c();
               var86 = (double)var79.a().a.d();
            }

            var89 = new com.aspose.cells.b.a.b.zq((float)var85, (float)var86, var83.b(), var83.c());
            a(var0, var1, var14, var54 - 1, var81, var89, var19[0]);
            var71 -= var29;
            var50 += var29;
         }
      }

      var72 = (double)(var10 - var5);
      var53 = (float)var1.b();
      var79 = var3.w();

      for(var54 = 0; var54 < var20.length; ++var54) {
         if (var20[var54] != 0.0D) {
            var55 = null;
            int var87 = var19.length + var54 - 1;
            if (var87 < var3.E().getCount()) {
               var55 = var15.b(var87);
            }

            if (var55 != null) {
               var79 = var55.o();
            }

            if (var79.a().d().g()) {
               var52 = (float)var1.a() * 0.175F;
            } else {
               var52 = (float)var1.a() * 0.2F;
            }

            var76 = Math.abs(var20[var54]) / var23 * 2.0D * (double)var5;
            var85 = (double)var11;
            var86 = var72;
            var72 += var76;
            int var57 = var19.length - 1 + var54;
            var81 = var25 == 0.0D ? 0.0D : var20[var54] / var25;
            var83 = a(var0, var1.z(), var14, var57, var81, var52, var53, var19[0]);
            var77 = 0.0D;
            switch(var79.j()) {
            case 1:
               var85 += (double)(((float)var5 - var83.b()) / 2.0F);
               var86 += (var76 - (double)var83.c()) / 2.0D;
               break;
            case 3:
               var85 += (double)(((float)var5 - var83.b()) / 2.0F);
               break;
            default:
               var85 = var85 + (double)var5 + 1.0D;
               var86 += (var76 - (double)var83.c()) / 2.0D;
            }

            if (var79.j() == 9) {
               var79.a().b = new com.aspose.cells.b.a.b.zp(zbuk.a(var85), zbuk.a(var86), zbuk.a((double)var83.b()), zbuk.a((double)var83.c()));
               var79.a().z();
               var85 = (double)var79.a().a.c();
               var86 = (double)var79.a().a.d();
            }

            com.aspose.cells.b.a.b.zq var88 = new com.aspose.cells.b.a.b.zq((float)var85, (float)var86, var83.b(), var83.c());
            a(var0, var1, var14, var57, var81, var88, var19[0]);
         }
      }

   }

   private static void a(zn var0, zig var1, com.aspose.cells.b.a.b.zp var2, List var3) throws Exception {
      zbcq var4 = (zbcq)var3.get(0);
      int var5 = var4.V();
      int var6 = var4.W();
      double var7 = (double)var2.e() / 2.0D;
      double var9 = var7 * (double)var6 / 100.0D;
      double var11 = (var7 - var9) / (double)var3.size();
      double var13 = (double)var2.c() + (double)var2.e() / 2.0D;
      double var15 = (double)var2.d() + (double)var2.f() / 2.0D;
      com.aspose.cells.b.a.b.zq var17 = new com.aspose.cells.b.a.b.zq((float)var2.c(), (float)var2.d(), (float)var2.e(), (float)var2.f());
      var17.a(var17.f() + (float)(var7 - var9));
      var17.b(var17.g() + (float)(var7 - var9));
      var17.c(var17.h() - 2.0F * (float)(var7 - var9));
      var17.d(var17.i() - 2.0F * (float)(var7 - var9));
      double var18 = var9;
      ArrayList var20 = new ArrayList();
      ArrayList var21 = new ArrayList();
      com.aspose.cells.b.a.b.a.zf var22 = var0.e();
      var0.a(4);

      int var23;
      int var25;
      zjg var28;
      double var38;
      com.aspose.cells.b.a.b.zq var47;
      for(var23 = 0; var23 < var3.size(); ++var23) {
         zbcq var24 = (zbcq)var3.get(var23);
         var25 = var24.aj();
         double var26 = 0.0D;
         var28 = var24.E();
         int var29 = var28.getCount();

         for(int var30 = 0; var30 < var28.getCount(); ++var30) {
            var26 += Math.abs(var28.a(var30).v());
         }

         double var55 = (double)((float)var5 - 90.0F);
         double var32 = 0.0D;

         for(int var34 = 0; var34 < var28.getCount(); ++var34) {
            zje var35 = var28.b(var34);
            if (var28.a(var34).v() != 0.0D) {
               var32 = a(var28.a(var34).v(), var26);
               if (var32 == 0.0D) {
                  var32 = 0.001D;
               }

               double var36;
               double var40;
               if (var23 == var3.size() - 1) {
                  var36 = (360.0D - var55 - var32 / 2.0D) * 3.141592653589793D / 180.0D;
                  var38 = var7 * (double)var35.E() / 100.0D;
                  var40 = var38 * Math.cos(var36);
                  double var42 = var38 * Math.sin(var36);
                  var13 = (double)var2.c() + (double)var2.e() / 2.0D + var40;
                  var15 = (double)var2.d() + (double)var2.f() / 2.0D - var42;
                  var17.a((float)(var13 - var18));
                  var17.b((float)(var15 - var18));
                  var17.c((float)(2.0D * var18));
                  var17.d((float)(2.0D * var18));
               }

               com.aspose.cells.b.a.b.a.ze var46 = new com.aspose.cells.b.a.b.a.ze();
               var47 = zbuk.b(var17);
               var46.a(var47, (float)var55, (float)var32);
               var36 = (360.0D - var55 - var32) * 3.141592653589793D / 180.0D;
               var38 = var18 * Math.cos(var36);
               var40 = var18 * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var58 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var38 = (var18 + var11) * Math.cos(var36);
               var40 = (var18 + var11) * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var43 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var46.a(var58, var43);
               com.aspose.cells.b.a.b.zq var48 = zbuk.b(var17);
               var48.a(var48.f() - (float)var11);
               var48.b(var48.g() - (float)var11);
               var48.c(var48.h() + 2.0F * (float)var11);
               var48.d(var48.i() + 2.0F * (float)var11);
               var46.a(var48, (float)(var55 + var32), -((float)var32));
               var36 = (360.0D - var55) * 3.141592653589793D / 180.0D;
               var38 = var18 * Math.cos(var36);
               var40 = var18 * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var44 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var38 = (var18 + var11) * Math.cos(var36);
               var40 = (var18 + var11) * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var45 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var46.a(var45, var44);
               var46.i();
               var35.i().a(var46);
               com.aspose.cells.b.a.a.ze.a(var20, (Object)var35);
               com.aspose.cells.b.a.a.ze.a(var21, (Object)var46);
               var35.a(new com.aspose.cells.b.a.b.zq(var48.f() + var48.h() / 2.0F, var48.g() + var48.i() / 2.0F, var48.h() / 2.0F, var48.i() / 2.0F));
               var35.d(var47.h() / 2.0F);
               var35.b((float)var55);
               var35.c((float)(var55 + var32));
               var55 += var32;
            }
         }

         var18 += var11;
         var17.a(var17.f() - (float)var11);
         var17.b(var17.g() - (float)var11);
         var17.c(var17.h() + 2.0F * (float)var11);
         var17.d(var17.i() + 2.0F * (float)var11);
      }

      for(var23 = 0; var23 < var20.size(); ++var23) {
         zje var49 = (zje)var20.get(var23);
         com.aspose.cells.b.a.b.a.ze var52 = (com.aspose.cells.b.a.b.a.ze)var21.get(var23);
         var49.k().a(var52);
      }

      var0.a(var22);
      float var51 = (float)var1.b();

      for(var25 = 0; var25 < var3.size(); ++var25) {
         zbcq var53 = (zbcq)var3.get(var25);
         int var27 = var53.aj();
         var28 = var53.E();
         double var54 = (double)((float)var5 - 90.0F);
         double var31 = 0.0D;
         double var33 = 0.0D;

         int var56;
         for(var56 = 0; var56 < var28.getCount(); ++var56) {
            var33 += Math.abs(var28.a(var56).v());
         }

         var18 = var9 + (double)var25 * var11 + var11 / 2.0D;

         for(var56 = 0; var56 < var28.getCount(); ++var56) {
            zje var57 = var28.b(var56);
            zpu var37 = var57.o();
            float var50;
            if (var37.a().d().g()) {
               var50 = (float)var1.a() * 0.175F;
            } else {
               var50 = (float)var1.a() * 0.2F;
            }

            var38 = var33 == 0.0D ? 0.0D : var28.a(var56).v() / var33;
            com.aspose.cells.b.a.b.zt var59 = a(var0, var1.z(), var27, var56, var38, var50, var51, 0.0D);
            var31 = a(var28.a(var56).v(), var33);
            double var41;
            double var60;
            double var61;
            if (var25 == var3.size() - 1) {
               var41 = (360.0D - var54 - var31 / 2.0D) * 3.141592653589793D / 180.0D;
               var60 = var7 * (double)var28.a(var56).E() / 100.0D;
               var61 = var60 * Math.cos(var41);
               double var62 = var60 * Math.sin(var41);
               var13 = (double)var2.c() + (double)var2.e() / 2.0D + var61;
               var15 = (double)var2.d() + (double)var2.f() / 2.0D - var62;
            }

            var41 = (360.0D - var54 - var31 / 2.0D) * 3.141592653589793D / 180.0D;
            var60 = var18 * Math.cos(var41);
            var61 = var18 * Math.sin(var41);
            var60 += var13;
            var61 = var15 - var61;
            var60 -= (double)(var59.b() / 2.0F);
            var61 -= (double)(var59.c() / 2.0F);
            if (var37.j() == 9) {
               var37.a().b = new com.aspose.cells.b.a.b.zp(zbuk.a(var60), zbuk.a(var61), zbuk.a((double)var59.b()), zbuk.a((double)var59.c()));
               var37.a().z();
               var60 = (double)var37.a().a.c();
               var61 = (double)var37.a().a.d();
            }

            var47 = new com.aspose.cells.b.a.b.zq((float)var60, (float)var61, var59.b(), var59.c());
            a(var0, var1, var27, var56, var38, var47, 0.0D);
            var54 += var31;
         }
      }

   }

   private static void b(zn var0, zig var1, com.aspose.cells.b.a.b.zp var2, List var3) throws Exception {
      zbcq var4 = (zbcq)var3.get(0);
      int var5 = var4.V();
      int var6 = var4.W();
      double var7 = (double)var2.e() / 2.0D / (double)(1.0F + var4.ay() / 100.0F);
      double var9 = var7 * (double)var6 / 100.0D;
      double var11 = (var7 - var9) / (double)var3.size();
      double var13 = (double)var2.c() + (double)var2.e() / 2.0D;
      double var15 = (double)var2.d() + (double)var2.f() / 2.0D;
      double var17 = var9;
      com.aspose.cells.b.a.b.zq var19 = com.aspose.cells.b.a.b.zq.c();
      var19.a((float)(var13 - var9));
      var19.b((float)(var15 - var9));
      var19.c((float)(2.0D * var9));
      var19.d((float)(2.0D * var9));
      ArrayList var20 = new ArrayList();
      ArrayList var21 = new ArrayList();
      com.aspose.cells.b.a.b.a.zf var22 = var0.e();
      var0.a(4);

      int var23;
      int var25;
      zjg var28;
      double var31;
      double var38;
      com.aspose.cells.b.a.b.zq var47;
      double var54;
      for(var23 = 0; var23 < var3.size(); ++var23) {
         zbcq var24 = (zbcq)var3.get(var23);
         var25 = var24.aj();
         double var26 = 0.0D;
         var28 = var24.E();

         for(int var29 = 0; var29 < var28.getCount(); ++var29) {
            var26 += Math.abs(var28.a(var29).v());
         }

         var54 = (double)((float)var5 - 90.0F);
         var31 = 0.0D;
         int var33 = var28.getCount();

         for(int var34 = 0; var34 < var28.getCount(); ++var34) {
            zje var35 = var28.b(var34);
            if (var28.a(var34).v() != 0.0D) {
               var31 = a(var28.a(var34).v(), var26);
               if (var31 == 0.0D) {
                  var31 = 0.001D;
               }

               double var36;
               double var40;
               if (var23 == var3.size() - 1) {
                  var36 = (360.0D - var54 - var31 / 2.0D) * 3.141592653589793D / 180.0D;
                  var38 = var7 * (double)var35.E() / 100.0D;
                  var40 = var38 * Math.cos(var36);
                  double var42 = var38 * Math.sin(var36);
                  var13 = (double)var2.c() + (double)var2.e() / 2.0D + var40;
                  var15 = (double)var2.d() + (double)var2.f() / 2.0D - var42;
                  var19.a((float)(var13 - var17));
                  var19.b((float)(var15 - var17));
                  var19.c((float)(2.0D * var17));
                  var19.d((float)(2.0D * var17));
               }

               com.aspose.cells.b.a.b.a.ze var46 = new com.aspose.cells.b.a.b.a.ze();
               var47 = zbuk.b(var19);
               var46.a(var47, (float)var54, (float)var31);
               var36 = (360.0D - var54 - var31) * 3.141592653589793D / 180.0D;
               var38 = var17 * Math.cos(var36);
               var40 = var17 * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var58 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var38 = (var17 + var11) * Math.cos(var36);
               var40 = (var17 + var11) * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var43 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var46.a(var58, var43);
               com.aspose.cells.b.a.b.zq var48 = zbuk.b(var19);
               var48.a(var48.f() - (float)var11);
               var48.b(var48.g() - (float)var11);
               var48.c(var48.h() + 2.0F * (float)var11);
               var48.d(var48.i() + 2.0F * (float)var11);
               var46.a(var48, (float)(var54 + var31), -((float)var31));
               var36 = (360.0D - var54) * 3.141592653589793D / 180.0D;
               var38 = var17 * Math.cos(var36);
               var40 = var17 * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var44 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var38 = (var17 + var11) * Math.cos(var36);
               var40 = (var17 + var11) * Math.sin(var36);
               var38 += var13;
               var40 = var15 - var40;
               com.aspose.cells.b.a.b.zo var45 = new com.aspose.cells.b.a.b.zo((float)var38, (float)var40);
               var46.a(var45, var44);
               var46.i();
               var35.i().a(var46);
               com.aspose.cells.b.a.a.ze.a(var20, (Object)var35);
               com.aspose.cells.b.a.a.ze.a(var21, (Object)var46);
               var35.a(new com.aspose.cells.b.a.b.zq(var48.f() + var48.h() / 2.0F, var48.g() + var48.i() / 2.0F, var48.h() / 2.0F, var48.i() / 2.0F));
               var35.d(var47.h() / 2.0F);
               var35.b((float)var54);
               var35.c((float)(var54 + var31));
               var54 += var31;
            }
         }

         var17 += var11;
         var19.a(var19.f() - (float)var11);
         var19.b(var19.g() - (float)var11);
         var19.c(var19.h() + 2.0F * (float)var11);
         var19.d(var19.i() + 2.0F * (float)var11);
      }

      for(var23 = 0; var23 < var20.size(); ++var23) {
         zje var49 = (zje)var20.get(var23);
         com.aspose.cells.b.a.b.a.ze var52 = (com.aspose.cells.b.a.b.a.ze)var21.get(var23);
         var49.k().a(var52);
      }

      var0.a(var22);
      var13 = (double)var2.c() + (double)var2.e() / 2.0D;
      var15 = (double)var2.d() + (double)var2.f() / 2.0D;
      float var51 = (float)var1.b();

      for(var25 = 0; var25 < var3.size(); ++var25) {
         zbcq var53 = (zbcq)var3.get(var25);
         int var27 = var53.aj();
         var28 = var53.E();
         var54 = (double)((float)var5 - 90.0F);
         var31 = 0.0D;
         double var55 = 0.0D;

         int var56;
         for(var56 = 0; var56 < var28.getCount(); ++var56) {
            var55 += Math.abs(var28.a(var56).v());
         }

         var17 = var9 + (double)var25 * var11 + var11 / 2.0D;

         for(var56 = 0; var56 < var28.getCount(); ++var56) {
            zje var57 = var28.b(var56);
            zpu var37 = var57.o();
            float var50;
            if (var37.a().d().g()) {
               var50 = (float)var1.a() * 0.175F;
            } else {
               var50 = (float)var1.a() * 0.2F;
            }

            var38 = var55 == 0.0D ? 0.0D : var28.a(var56).v() / var55;
            com.aspose.cells.b.a.b.zt var59 = a(var0, var1.z(), var27, var56, var38, var50, var51, 0.0D);
            var31 = a(var28.a(var56).v(), var55);
            double var41;
            double var60;
            double var61;
            if (var25 == var3.size() - 1) {
               var41 = (360.0D - var54 - var31 / 2.0D) * 3.141592653589793D / 180.0D;
               var60 = var7 * (double)var28.a(var56).E() / 100.0D;
               var61 = var60 * Math.cos(var41);
               double var62 = var60 * Math.sin(var41);
               var13 = (double)var2.c() + (double)var2.e() / 2.0D + var61;
               var15 = (double)var2.d() + (double)var2.f() / 2.0D - var62;
            }

            var41 = (360.0D - var54 - var31 / 2.0D) * 3.141592653589793D / 180.0D;
            var60 = var17 * Math.cos(var41);
            var61 = var17 * Math.sin(var41);
            var60 += var13;
            var61 = var15 - var61;
            var60 -= (double)(var59.b() / 2.0F);
            var61 -= (double)(var59.c() / 2.0F);
            if (var37.j() == 9) {
               var37.a().b = new com.aspose.cells.b.a.b.zp(zbuk.a(var60), zbuk.a(var61), zbuk.a((double)var59.b()), zbuk.a((double)var59.c()));
               var37.a().z();
               var60 = (double)var37.a().a.c();
               var61 = (double)var37.a().a.d();
            }

            var47 = new com.aspose.cells.b.a.b.zq((float)var60, (float)var61, var59.b(), var59.c());
            a(var0, var1, var27, var56, var38, var47, 0.0D);
            var54 += var31;
         }
      }

   }

   static void a(zig var0, com.aspose.cells.b.a.b.zp[] var1, zbcq var2) {
      if (var1[0].e() > 0 && var1[0].f() > 0 && var2.as()) {
         if (var0.B().s()) {
            byte var3 = 4;
            var1[0].a(var1[0].c() + var3);
            var1[0].b(var1[0].d() + var3);
            var1[0].c(var1[0].e() - 2 * var3);
            var1[0].d(var1[0].f() - 2 * var3);
            boolean var4 = false;
            if (var2.m() != 35 && var2.m() != 36) {
               if (var2.aw() && (var2.w().j() == 4 || var2.w().j() == 0)) {
                  var4 = true;
               }
            } else if (var2.aw()) {
               var4 = true;
            }

            if (var4) {
               int var5 = var1[0].e();
               if (var1[0].e() > var1[0].f()) {
                  var5 = var1[0].f();
               }

               int var6 = zbuk.b((double)((float)var5 / 100.0F * 7.0F));
               var1[0].a(var1[0].c() + var6);
               var1[0].b(var1[0].d() + var6);
               var1[0].c(var1[0].e() - 2 * var6);
               var1[0].d(var1[0].f() - 2 * var6);
            }

            byte var7 = 10;
            if (var1[0].e() < var7) {
               var1[0].c(var7);
            }

            if (var1[0].f() < var7) {
               var1[0].d(var7);
            }
         }

      }
   }

   static void a(zn var0, zig var1, com.aspose.cells.b.a.b.zp[] var2, zbcq var3) throws Exception {
      a(var0, var1, var2[0], var3);
      a(var3, (double)(var2[0].e() / 2));
      ArrayList var4 = a(var3, var2[0]);

      for(int var5 = 0; var5 < 10 && var4.size() > 0; ++var5) {
         a(var3, (double)(var2[0].e() / 2), var4);
         ArrayList var6 = new ArrayList();

         for(int var7 = 0; var7 < var4.size(); ++var7) {
            ArrayList var8 = (ArrayList)var4.get(var7);
            ArrayList var9 = new ArrayList();

            for(int var10 = 0; var10 < var8.size(); ++var10) {
               com.aspose.cells.b.a.a.ze.a(var9, var8.get(var10));
            }

            com.aspose.cells.b.a.a.ze.a(var6, (Object)var9);
         }

         ArrayList var11 = new ArrayList();
         a(var3, var4, var2[0], var2[0], var11);
         a(var3, (double)(var2[0].e() / 2), var6, var11);
         var4 = a(var3, var2[0]);
         int var12 = 0;

         ArrayList var14;
         for(Iterator var13 = var4.iterator(); var13.hasNext(); var12 += var14.size()) {
            var14 = (ArrayList)var13.next();
         }

         if (var11.size() == var12) {
            break;
         }
      }

   }

   static void a(zn var0, zig var1, com.aspose.cells.b.a.b.zp var2, zbcq var3) throws Exception {
      com.aspose.cells.b.a.b.zq var4 = new com.aspose.cells.b.a.b.zq((float)var2.c(), (float)var2.d(), (float)var2.e(), (float)var2.f());
      a(var0, var1, var4, var3);
   }

   static void a(zn var0, zig var1, com.aspose.cells.b.a.b.zq var2, zbcq var3) throws Exception {
      int var4 = var3.aj();
      double var5 = 0.0D;
      zjg var7 = var3.E();

      for(int var8 = 0; var8 < var7.getCount(); ++var8) {
         var5 += Math.abs(var7.a(var8).v());
      }

      double var51 = (double)var2.f() + (double)var2.h() / 2.0D;
      double var10 = (double)var2.g() + (double)var2.i() / 2.0D;
      double var12 = (double)(90.0F - (float)var3.V());
      double var14 = 0.0D;
      double var16 = -var12;
      float var19 = (float)var1.b();

      for(int var20 = 0; var20 < var7.getCount(); ++var20) {
         zje var21 = var7.b(var20);
         zpu var22 = var21.o();
         float var18;
         if (var22.a().d().g()) {
            var18 = (float)var1.a() * 0.175F;
         } else {
            var18 = (float)var1.a() * 0.2F;
         }

         double var23 = var5 == 0.0D ? 0.0D : Math.abs(var7.a(var20).v()) / var5;
         com.aspose.cells.b.a.b.zt var25 = a(var0, var1.z(), var4, var20, var23, var18, var19, 0.0D);
         var14 = a(var7.a(var20).v(), var5);
         double var26 = (var12 - var14 / 2.0D) % 360.0D;
         double var28 = var26 * 3.141592653589793D / 180.0D;
         var22.g = var28;
         double var30 = (double)(var21.E() / 100.0F);
         double var32;
         if (var1.N() == 44) {
            var32 = (double)var2.h() / 2.0D;
         } else {
            var32 = (double)var2.h() / 2.0D / (1.0D + var30);
         }

         double var34 = var32 * var30;
         double var36 = (var30 + 1.0D) * var32 * Math.cos(var28);
         double var38 = (var30 + 1.0D) * var32 * Math.sin(var28);
         var22.d = new com.aspose.cells.b.a.b.zo((float)(var51 + var36), (float)(var10 - var38));
         double var40 = 0.0D;
         double var42 = 0.0D;
         boolean var44 = false;
         int var45 = var22.j();

         com.aspose.cells.b.a.b.zq var52;
         while(!var44) {
            double var46;
            double[] var48;
            double[] var49;
            switch(var45) {
            case 1:
               var46 = var34 + var32 * 0.5D;
               var40 = var46 * Math.cos(var28);
               var42 = var46 * Math.sin(var28);
               var40 -= (double)(var25.b() / 2.0F);
               var42 += (double)(var25.c() / 2.0F);
               var44 = true;
               break;
            case 2:
            case 5:
            case 6:
            case 7:
            case 8:
            default:
               var46 = var34 + var32 * 0.96D;
               var40 = var46 * Math.cos(var28);
               var42 = var46 * Math.sin(var28);
               var48 = new double[]{var40};
               var49 = new double[]{var42};
               b(var48, var49, var26, var25);
               var40 = var48[0];
               var42 = var49[0];
               var52 = new com.aspose.cells.b.a.b.zq((float)var40, (float)var42, var25.b(), var25.c());
               boolean var54 = a(var0, (float)var16, (float)var12, (float)var14, (float)var32, (float)var34, var52, var22);
               if (var54) {
                  var44 = true;
               } else {
                  com.aspose.cells.b.a.b.zo var50 = a(var0, (float)var16, (float)var12, (float)var14, (float)var32, (float)var34, var25, var22);
                  if (var50.b()) {
                     var44 = false;
                     var45 = 4;
                  } else {
                     var40 = (double)var50.d();
                     var42 = (double)var50.e();
                     var44 = true;
                  }
               }
               break;
            case 3:
               var46 = var34 + var32 * 0.96D;
               var40 = var46 * Math.cos(var28);
               var42 = var46 * Math.sin(var28);
               var48 = new double[]{var40};
               var49 = new double[]{var42};
               b(var48, var49, var26, var25);
               var40 = var48[0];
               var42 = var49[0];
               var44 = true;
               break;
            case 4:
               var46 = var34 + var32 * 1.04D;
               var40 = var46 * Math.cos(var28);
               var42 = var46 * Math.sin(var28);
               var48 = new double[]{var40};
               var49 = new double[]{var42};
               a(var48, var49, var26, var25);
               var40 = var48[0];
               var42 = var49[0];
               var44 = true;
               break;
            case 9:
               var46 = var34 + var32 * 1.03D;
               var40 = var46 * Math.cos(var28);
               var42 = var46 * Math.sin(var28);
               var48 = new double[]{var40};
               var49 = new double[]{var42};
               a(var48, var49, var26, var25);
               var40 = var48[0];
               var42 = var49[0];
               var44 = true;
            }
         }

         var40 += var51;
         var42 = var10 - var42;
         if (var22.j() == 9) {
            var22.a().b = new com.aspose.cells.b.a.b.zp(zbuk.a(var40), zbuk.a(var42), zbuk.a((double)var25.b()), zbuk.a((double)var25.c()));
            com.aspose.cells.b.a.b.zp var53 = new com.aspose.cells.b.a.b.zp(var22.a().b.c(), var22.a().b.d(), var22.a().b.e(), var22.a().b.f());
            com.aspose.cells.b.a.b.zp[] var55 = new com.aspose.cells.b.a.b.zp[]{var53};
            var1.a(var55);
            var53 = var55[0];
            var22.a().b.a(var53.c());
            var22.a().b.b(var53.d());
            var22.a().b.c(var53.e());
            var22.a().b.d(var53.f());
            var22.a().z();
            var40 = (double)var22.a().a.c();
            var42 = (double)var22.a().a.d();
         }

         var52 = new com.aspose.cells.b.a.b.zq((float)var40, (float)var42, var25.b(), var25.c());
         var16 += var14;
         var12 -= var14;
         var22.a = var52;
         var22.b = var52;
      }

   }

   private static void a(double[] var0, double[] var1, double var2, com.aspose.cells.b.a.b.zt var4) {
      double var5 = 17.5D;
      double var7 = 2.0D * var5;
      if (var2 <= -90.0D + var5 && var2 >= -90.0D - var5) {
         var0[0] -= (-90.0D + var5 - var2) * (double)var4.b() / var7;
      } else if (var2 <= -90.0D - var5 && var2 >= -270.0D + var5) {
         var0[0] -= (double)var4.b();
      } else if (var2 <= -270.0D + var5 && var2 >= -270.0D - var5) {
         var0[0] -= (var2 - (-270.0D - var5)) * (double)var4.b() / var7;
      } else if (var2 >= 90.0D - var5 && var2 <= 90.0D) {
         var0[0] -= (var2 - (90.0D - var5)) * (double)var4.b() / var7;
      }

      if (var2 <= -135.0D && var2 >= -225.0D) {
         var1[0] += (-135.0D - var2) * (double)var4.c() / 90.0D;
      } else if ((var2 > -225.0D || var2 < -315.0D) && (var2 > 90.0D || var2 < 45.0D)) {
         if (var2 < -315.0D && var2 >= -360.0D) {
            var1[0] += (var2 - -405.0D) * (double)var4.c() / 90.0D;
         } else if (var2 <= 45.0D && var2 >= -45.0D) {
            var1[0] += (var2 - -45.0D) * (double)var4.c() / 90.0D;
         }
      } else {
         var1[0] += (double)var4.c();
      }

   }

   private static void b(double[] var0, double[] var1, double var2, com.aspose.cells.b.a.b.zt var4) {
      if (var2 >= -112.5D && var2 <= -67.5D) {
         var0[0] -= (var2 - -112.5D) * (double)var4.b() / 45.0D;
      } else if (var2 >= -292.5D && var2 <= -247.5D) {
         var0[0] -= (-247.5D - var2) * (double)var4.b() / 45.0D;
      } else if (var2 > 67.5D && var2 <= 90.0D) {
         var0[0] -= (112.5D - var2) * (double)var4.b() / 45.0D;
      } else if (var2 >= -67.5D && var2 <= 67.5D || var2 <= -292.5D) {
         var0[0] -= (double)var4.b();
      }

      if (var2 <= 22.5D && var2 >= -22.5D) {
         var1[0] += (22.5D - var2) * (double)var4.c() / 45.0D;
      } else if (var2 <= -337.5D) {
         var1[0] += (-337.5D - var2) * (double)var4.c() / 45.0D;
      } else if (var2 >= -202.5D && var2 <= -157.5D) {
         var1[0] += (var2 - -202.5D) * (double)var4.c() / 45.0D;
      } else if (var2 >= -157.5D && var2 <= -22.5D) {
         var1[0] += (double)var4.c();
      }

   }

   private static boolean a(zn var0, float var1, float var2, float var3, float var4, float var5, com.aspose.cells.b.a.b.zq var6, zpu var7) throws Exception {
      zig var8 = var7.a().a();
      com.aspose.cells.b.a.b.a.ze var9 = new com.aspose.cells.b.a.b.a.ze();
      com.aspose.cells.b.a.b.zq var10 = new com.aspose.cells.b.a.b.zq((float)(-var8.a() / 2), (float)(-var8.b() / 2), (float)var8.a(), (float)var8.b());
      var9.b(var10);
      com.aspose.cells.b.a.b.a.ze var11 = new com.aspose.cells.b.a.b.a.ze();
      double var12 = (double)(var2 - var3 / 2.0F) * 3.141592653589793D / 180.0D % 6.283185307179586D;
      double var14 = (double)var5 * Math.cos(var12);
      double var16 = (double)var5 * Math.sin(var12);
      com.aspose.cells.b.a.b.zq var18 = new com.aspose.cells.b.a.b.zq((float)var14 - var4, (float)var16 + var4, 2.0F * var4, 2.0F * var4);
      var11.b(var18.f(), -var18.g(), var18.h(), var18.i(), var1, var3);
      com.aspose.cells.b.a.b.zr var19 = new com.aspose.cells.b.a.b.zr(var9);
      var19.b(var11);
      if (var7.a().d().c() == 0 || var7.a().d().a().isEmpty()) {
         var6.a((float)(-zpw.a - 1), (float)(-zpw.a - 1));
      }

      var19.a(new com.aspose.cells.b.a.b.zq(var6.f(), -var6.g(), var6.h(), var6.i()));
      if (var0.a().b(var19)) {
         var19.c();
         var19 = null;
         return true;
      } else {
         var19.c();
         var19 = null;
         return false;
      }
   }

   private static com.aspose.cells.b.a.b.zo a(zn var0, float var1, float var2, float var3, float var4, float var5, com.aspose.cells.b.a.b.zt var6, zpu var7) throws Exception {
      float var8 = var2 - var3 / 2.0F;
      float var9 = 0.0F;
      float var10 = 0.0F;
      float var11 = -0.5F;
      boolean var12 = false;
      float var13;
      com.aspose.cells.b.a.b.zq var14;
      if (var8 > -90.0F && var8 < 0.0F || var8 >= -270.0F && var8 < -180.0F) {
         var12 = false;
         var13 = var8;

         while(var13 > var2 - var3) {
            var13 += var11;
            var14 = a((double)var4, (double)var13, var6, var2, var3, var5);
            var9 += var11;
            if (a(var0, var1, var2, var3, var4, var5, var14, var7)) {
               var10 += var11;
               if (!var12) {
                  var12 = true;
               }
            } else if (var12) {
               var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
               return var14.d();
            }
         }

         if (var12) {
            var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
            return var14.d();
         }

         var12 = false;
         var13 = var8;
         var9 = 0.0F;
         var10 = 0.0F;

         while(var13 < var2) {
            var13 -= var11;
            var14 = a((double)var4, (double)var13, var6, var2, var3, var5);
            var9 -= var11;
            if (a(var0, var1, var2, var3, var4, var5, var14, var7)) {
               var10 -= var11;
               if (!var12) {
                  var12 = true;
               }
            } else if (var12) {
               var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
               return var14.d();
            }
         }

         if (var12) {
            var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
            return var14.d();
         }
      } else {
         var12 = false;
         var13 = var8;

         while(var13 < var2) {
            var13 -= var11;
            var14 = a((double)var4, (double)var13, var6, var2, var3, var5);
            var9 -= var11;
            if (a(var0, var1, var2, var3, var4, var5, var14, var7)) {
               var10 -= var11;
               if (!var12) {
                  var12 = true;
               }
            } else if (var12) {
               var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
               return var14.d();
            }
         }

         if (var12) {
            var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
            return var14.d();
         }

         var12 = false;
         var13 = var8;
         var9 = 0.0F;
         var10 = 0.0F;

         while(var13 > var2 - var3) {
            var13 += var11;
            var14 = a((double)var4, (double)var13, var6, var2, var3, var5);
            var9 += var11;
            if (a(var0, var1, var2, var3, var4, var5, var14, var7)) {
               var10 += var11;
               if (!var12) {
                  var12 = true;
               }
            } else if (var12) {
               var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
               return var14.d();
            }
         }

         if (var12) {
            var14 = a((double)var4, (double)(var8 + var9 - var10 / 2.0F), var6, var2, var3, var5);
            return var14.d();
         }
      }

      return com.aspose.cells.b.a.b.zo.a();
   }

   private static com.aspose.cells.b.a.b.zq a(double var0, double var2, com.aspose.cells.b.a.b.zt var4, float var5, float var6, float var7) {
      var2 %= 360.0D;
      double var8 = var2 * 3.141592653589793D / 180.0D;
      var0 -= var0 * 0.03D;
      double var10 = var0 * Math.cos(var8);
      double var12 = var0 * Math.sin(var8);
      if (var2 < 90.0D && var2 > -90.0D || var2 < -270.0D) {
         var10 -= (double)var4.b();
      }

      if (var2 > -180.0D && var2 < 0.0D) {
         var12 += (double)var4.c();
      }

      var8 = (double)(var5 - var6 / 2.0F) * 3.141592653589793D / 180.0D % 6.283185307179586D;
      double var14 = (double)var7 * Math.cos(var8);
      double var16 = (double)var7 * Math.sin(var8);
      var10 += var14;
      var12 += var16;
      return new com.aspose.cells.b.a.b.zq((float)var10, (float)var12, var4.b(), var4.c());
   }

   private static void a(zbcq var0, double var1) {
      zjg var3 = var0.E();
      double var4 = var1 * (double)a;
      ArrayList var8 = new ArrayList();
      if (var0.R()) {
         for(int var9 = 0; var9 < var3.getCount(); ++var9) {
            if (var3.a(var9).p().j() == 9) {
               com.aspose.cells.b.a.a.ze.a(var8, (Object)var9);
               zje var10 = var3.b(var9);
               zpu var11 = var10.o();
               var11.h = true;
               if (var11.e.b()) {
                  if (!var11.B()) {
                     var11.f = new com.aspose.cells.b.a.b.zo(var11.a.f(), var11.a.g() + var11.a.i() / 2.0F);
                     var11.e = new com.aspose.cells.b.a.b.zo(var11.a.f() - (float)var4, var11.f.e());
                  } else {
                     var11.f = new com.aspose.cells.b.a.b.zo(var11.a.l(), var11.a.k() + var11.a.i() / 2.0F);
                     var11.e = new com.aspose.cells.b.a.b.zo(var11.a.l() + (float)var4, var11.f.e());
                  }
               }
            }
         }
      }

   }

   private static void a(zbcq var0, double var1, ArrayList var3) {
      double var4 = var1 * (double)a;
      double var6 = var4;

      for(int var8 = 0; var8 < var3.size(); ++var8) {
         ArrayList var9 = (ArrayList)var3.get(var8);

         for(int var10 = 0; var10 < var9.size(); ++var10) {
            zje var11 = var0.E().b((Integer)var9.get(var10));
            zpu var12 = var11.o();
            var12.h = true;
            if (var12.e.b()) {
               if (!var12.B()) {
                  var12.a.a((float)((double)var12.d.d() + var4 + var6 * Math.abs(Math.cos(var12.g))));
               } else {
                  var12.a.a((float)((double)(var12.d.d() - var12.a.h()) - var4 - var6 * Math.abs(Math.cos(var12.g))));
               }

               if (var12.C()) {
                  var12.a.b((float)((double)var12.d.e() + var6 * Math.abs(Math.sin(var12.g)) - (double)(var12.a.i() / 2.0F)));
               } else {
                  var12.a.b((float)((double)var12.d.e() - var6 * Math.abs(Math.sin(var12.g)) - (double)(var12.a.i() / 2.0F)));
               }

               if (!var12.B()) {
                  var12.f = new com.aspose.cells.b.a.b.zo(var12.a.f(), var12.a.g() + var12.a.i() / 2.0F);
                  var12.e = new com.aspose.cells.b.a.b.zo(var12.a.f() - (float)var4, var12.f.e());
               } else {
                  var12.f = new com.aspose.cells.b.a.b.zo(var12.a.l(), var12.a.k() + var12.a.i() / 2.0F);
                  var12.e = new com.aspose.cells.b.a.b.zo(var12.a.l() + (float)var4, var12.f.e());
               }
            }
         }
      }

   }

   private static void a(zbcq var0, double var1, ArrayList var3, ArrayList var4) {
      double var5 = var1 * (double)a;

      for(int var9 = 0; var9 < var3.size(); ++var9) {
         ArrayList var10 = (ArrayList)var3.get(var9);

         for(int var11 = 0; var11 < var10.size(); ++var11) {
            int var12;
            for(var12 = 0; var12 < var4.size() && (Integer)var10.get(var11) != (Integer)var4.get(var12); ++var12) {
               ;
            }

            if (var12 == var4.size()) {
               zje var13 = var0.E().b((Integer)var10.get(var11));
               zpu var14 = var13.o();
               if (!var14.B()) {
                  var14.f = new com.aspose.cells.b.a.b.zo(var14.a.f(), var14.a.g() + var14.a.i() / 2.0F);
                  var14.e = new com.aspose.cells.b.a.b.zo(var14.a.f() - (float)var5, var14.f.e());
               } else {
                  var14.f = new com.aspose.cells.b.a.b.zo(var14.a.l(), var14.a.k() + var14.a.i() / 2.0F);
                  var14.e = new com.aspose.cells.b.a.b.zo(var14.a.l() + (float)var5, var14.f.e());
               }
            }
         }
      }

   }

   private static void a(zbcq var0, ArrayList var1, com.aspose.cells.b.a.b.zp var2, com.aspose.cells.b.a.b.zp var3, ArrayList var4) {
      int var5;
      for(var5 = 0; var5 < var1.size(); ++var5) {
         ArrayList var6 = (ArrayList)var1.get(var5);
         b(var0, var6, var2, var3, var4);
      }

      for(var5 = 0; var5 < var4.size(); ++var5) {
         zpu var7 = var0.E().b((Integer)var4.get(var5)).o();
         var7.a = var7.b;
         var7.f = com.aspose.cells.b.a.b.zo.a();
         var7.e = com.aspose.cells.b.a.b.zo.a();
      }

   }

   private static void b(zbcq var0, ArrayList var1, com.aspose.cells.b.a.b.zp var2, com.aspose.cells.b.a.b.zp var3, ArrayList var4) {
      zig var5 = var0.v();
      com.aspose.cells.b.a.b.zp var6 = var5.i;
      if (var1.size() > 1) {
         float var7 = b;
         var7 = 2.0F;
         ArrayList var8 = new ArrayList();
         com.aspose.cells.b.a.a.ze.a(var8, var1.get(0));

         int var9;
         int var11;
         zpu var13;
         for(var9 = 1; var9 < var1.size(); ++var9) {
            int var10 = (Integer)var8.get(var8.size() - 1);
            var11 = (Integer)var1.get(var9);
            if (var11 == var10 + 1) {
               com.aspose.cells.b.a.a.ze.a(var8, var1.get(var9));
            } else {
               int var12;
               for(var12 = var10 + 1; var12 < var11; ++var12) {
                  var13 = var0.E().b(var12).o();
                  if (var13.a.h() != 0.0F && var13.a.i() != 0.0F) {
                     break;
                  }
               }

               if (var12 != var11) {
                  break;
               }

               com.aspose.cells.b.a.a.ze.a(var8, var1.get(var9));
            }
         }

         ArrayList var19 = new ArrayList();
         if (var9 == var1.size()) {
            com.aspose.cells.b.a.a.ze.a(var19, (Collection)var1);
         } else {
            for(var11 = var9; var11 < var1.size(); ++var11) {
               com.aspose.cells.b.a.a.ze.a(var19, var1.get(var11));
            }

            com.aspose.cells.b.a.a.ze.a(var19, (Collection)var8);
         }

         var11 = var19.size() / 2;
         if (var19.size() == 2) {
            var11 = 0;
         }

         int var14;
         zpu var20 = var0.E().b((Integer)var19.get(var11)).o();
         zpu var15;
         float var16;
         zpu var17;
         float var18;
         float var21;
         int var22;
         label438:
         switch(var20.D()) {
         case 1:
            var13 = var0.E().b((Integer)var19.get(var11)).o();
            if (var13.a.g() > (float)var6.d()) {
               if (var13.a.g() - var13.a.i() / 2.0F > (float)var6.d()) {
                  var13.a.b(var13.a.g() - var13.a.i() / 2.0F);
               } else {
                  var13.a.b((float)var6.d());
               }
            }

            if (var13.a.l() < (float)var6.i()) {
               if (var13.a.l() + var13.a.h() / 2.0F < (float)var6.i()) {
                  var13.a.a(var13.a.f() + var13.a.h() / 2.0F);
               } else {
                  var13.a.a((float)var6.i() - var13.a.h());
               }
            }

            for(var14 = var11 - 1; var14 >= 0; --var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.f() - var15.a.l());
               var15.a.a(var15.a.f() - (var16 + var7));
               var13 = var15;
               if (var15.a.g() > (float)var6.d()) {
                  if (var15.a.g() - var15.a.i() > (float)var6.d()) {
                     var15.a.b(var15.a.g() - var15.a.i());
                  } else {
                     var15.a.b((float)var6.d());
                  }
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();
            var14 = var11 + 1;

            while(true) {
               if (var14 >= var19.size()) {
                  break label438;
               }

               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.m() - var15.a.g());
               var15.a.b(var15.a.g() + var16 + var7);
               var13 = var15;
               if (var15.a.l() < (float)var6.i()) {
                  if (var15.a.l() + var15.a.h() / 2.0F < (float)var6.i()) {
                     var15.a.a(var15.a.f() + var15.a.h() / 2.0F);
                  } else {
                     var15.a.a((float)var6.i() - var15.a.h());
                  }
               }

               ++var14;
            }
         case 2:
            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = 0; var14 < var19.size(); ++var14) {
               var13 = var0.E().b((Integer)var19.get(var14)).o();
               if (var13.a.l() < (float)var6.i()) {
                  if (var13.a.l() + var13.a.h() / 2.0F < (float)var6.i()) {
                     var13.a.a(var13.a.f() + var13.a.h() / 2.0F);
                  } else {
                     var13.a.a((float)var6.i() - var13.a.h());
                  }
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = var11 - 1; var14 >= 0; --var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.g() - var15.a.m());
               var15.a.b(var15.a.g() - (var16 + var7));
               var13 = var15;
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();
            var14 = var11 + 1;

            while(true) {
               if (var14 >= var19.size()) {
                  break label438;
               }

               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.m() - var15.a.g());
               var15.a.b(var15.a.g() + var16 + var7);
               var13 = var15;
               ++var14;
            }
         case 3:
            var13 = var0.E().b((Integer)var19.get(var11)).o();
            if (var13.a.m() < (float)var6.j()) {
               if (var13.a.m() + var13.a.i() / 2.0F < (float)var6.j()) {
                  var13.a.b(var13.a.g() + var13.a.i() / 2.0F);
               } else {
                  var13.a.b((float)var6.j() - var13.a.i());
               }
            }

            if (var13.a.l() < (float)var6.i()) {
               if (var13.a.l() + var13.a.h() / 2.0F < (float)var6.i()) {
                  var13.a.a(var13.a.f() + var13.a.h() / 2.0F);
               } else {
                  var13.a.a((float)var6.i() - var13.a.h());
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = var11 - 1; var14 >= 0; --var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.g() - var15.a.m());
               var15.a.b(var15.a.g() - (var16 + var7));
               var13 = var15;
               if (var15.a.l() < (float)var6.i()) {
                  if (var15.a.l() + var15.a.h() / 2.0F < (float)var6.i()) {
                     var15.a.a(var15.a.f() + var15.a.h() / 2.0F);
                  } else {
                     var15.a.a((float)var6.i() - var15.a.h());
                  }
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();
            var14 = var11 + 1;

            while(true) {
               if (var14 >= var19.size()) {
                  break label438;
               }

               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.m() - var15.a.g());
               var15.a.b(var15.a.g() + var16 + var7);
               var13 = var15;
               ++var14;
            }
         case 4:
            var13 = var0.E().b((Integer)var19.get(var11)).o();
            if (var13.g > -1.5707963267948966D && var19.size() > 2) {
               var13.a.a(var13.a.f() - var13.a.h() / 2.0F);
            }

            if (var13.a.m() < (float)var6.j()) {
               if (var13.a.m() + var13.a.i() < (float)var6.j()) {
                  var13.a.b(var13.a.g() + var13.a.i());
               } else {
                  var13.a.b((float)var6.j() - var13.a.i());
               }
            }

            for(var14 = var11 - 1; var14 >= 0; --var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.l() - var15.a.f());
               var15.a.a(var15.a.f() + var16 + var7);
               var13 = var15;
            }

            if (var11 >= 2) {
               var13 = var0.E().b((Integer)var19.get(var19.size() - 1)).o();
               var21 = 0.0F;
               var15 = var0.E().b((Integer)var19.get(var11 - 1)).o();
               var21 = (float)var6.j() - var15.a.m();
               var21 /= (float)(var11 - 1);
               var13 = var0.E().b((Integer)var19.get(0)).o();

               for(var22 = 1; var22 < var11; ++var22) {
                  var17 = var0.E().b((Integer)var19.get(var22)).o();
                  var18 = Math.abs(var13.a.m() - var17.a.g());
                  if (var18 < var21) {
                     var17.a.b(var17.a.g() + var18 + var7);
                  } else if (var21 > 0.0F) {
                     var17.a.b(var17.a.g() + var21);
                  }

                  var13 = var17;
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = var11 + 1; var14 < var19.size(); ++var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.f() - var15.a.l());
               var15.a.a(var15.a.f() - (var16 + var7));
               var13 = var15;
            }

            if (var19.size() - (var11 + 1) >= 2) {
               var13 = var0.E().b((Integer)var19.get(var19.size() - 1)).o();
               var21 = 0.0F;
               var15 = var0.E().b((Integer)var19.get(var11 + 1)).o();
               var21 = (float)var6.j() - var15.a.m();
               var21 /= (float)(var11 - 1);

               for(var22 = var19.size() - 2; var22 > var11; --var22) {
                  var17 = var0.E().b((Integer)var19.get(var22)).o();
                  var18 = Math.abs(var13.a.m() - var17.a.g());
                  if (var18 < var21) {
                     var17.a.b(var17.a.g() + var18 + var7);
                  } else if (var21 > 0.0F) {
                     var17.a.b(var17.a.g() + var21);
                  }

                  var13 = var17;
               }
            }
            break;
         case 5:
            var13 = var0.E().b((Integer)var19.get(var11)).o();
            if (var13.a.m() < (float)var6.j()) {
               if (var13.a.m() + var13.a.i() / 2.0F < (float)var6.j()) {
                  var13.a.b(var13.a.g() + var13.a.i() / 2.0F);
               } else {
                  var13.a.b((float)var6.j() - var13.a.i());
               }
            }

            if (var13.a.f() > (float)var6.c()) {
               if (var13.a.f() + var13.a.h() / 2.0F > (float)var6.c()) {
                  var13.a.a(var13.a.f() - var13.a.h() / 2.0F);
               } else {
                  var13.a.a((float)var6.c() + var13.a.h());
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = var11 - 1; var14 >= 0; --var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.l() - var15.a.f());
               var15.a.a(var15.a.f() + var16 + var7);
               var13 = var15;
               if (var15.a.m() < (float)var6.j()) {
                  if (var15.a.m() + var15.a.i() < (float)var6.j()) {
                     var15.a.b(var15.a.g() + var15.a.i());
                  } else {
                     var15.a.b((float)var6.j() - var15.a.i());
                  }
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();
            var14 = var11 + 1;

            while(true) {
               if (var14 >= var19.size()) {
                  break label438;
               }

               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.g() - var15.a.m());
               var15.a.b(var15.a.g() - (var16 + var7));
               var13 = var15;
               if (var15.a.f() > (float)var6.c()) {
                  if (var15.a.f() + var15.a.h() > (float)var6.c()) {
                     var15.a.a(var15.a.f() - var15.a.h());
                  } else {
                     var15.a.a((float)var6.c() + var15.a.h());
                  }
               }

               ++var14;
            }
         case 6:
            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = 0; var14 < var19.size(); ++var14) {
               var13 = var0.E().b((Integer)var19.get(var14)).o();
               if (var13.a.f() > (float)var6.c()) {
                  if (var13.a.f() + var13.a.h() / 2.0F > (float)var6.c()) {
                     var13.a.a(var13.a.f() - var13.a.h() / 2.0F);
                  } else {
                     var13.a.a((float)var6.c() + var13.a.h());
                  }
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = var11 + 1; var14 < var19.size(); ++var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.g() - var15.a.m());
               var15.a.b(var15.a.g() - (var16 + var7));
               var13 = var15;
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();
            var14 = var11 - 1;

            while(true) {
               if (var14 < 0) {
                  break label438;
               }

               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.m() - var15.a.g());
               var15.a.b(var15.a.g() + var16 + var7);
               var13 = var15;
               --var14;
            }
         case 7:
            var13 = var0.E().b((Integer)var19.get(var11)).o();
            if (var13.a.g() > (float)var6.d()) {
               if (var13.a.g() - var13.a.i() / 2.0F > (float)var6.d()) {
                  var13.a.b(var13.a.g() - var13.a.i() / 2.0F);
               } else {
                  var13.a.b((float)var6.d());
               }
            }

            if (var13.a.f() > (float)var6.c()) {
               if (var13.a.f() + var13.a.h() / 2.0F > (float)var6.c()) {
                  var13.a.a(var13.a.f() - var13.a.h() / 2.0F);
               } else {
                  var13.a.a((float)var6.c() + var13.a.h());
               }
            }

            for(var14 = var11 - 1; var14 >= 0; --var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.m() - var15.a.g());
               var15.a.b(var15.a.g() + var16 + var7);
               var13 = var15;
               if (var15.a.f() > (float)var6.c()) {
                  if (var15.a.f() + var15.a.h() > (float)var6.c()) {
                     var15.a.a(var15.a.f() - var15.a.h());
                  } else {
                     var15.a.a((float)var6.c() + var15.a.h());
                  }
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();
            var14 = var11 + 1;

            while(true) {
               if (var14 >= var19.size()) {
                  break label438;
               }

               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.l() - var15.a.f());
               var15.a.a(var15.a.f() + var16 + var7);
               var13 = var15;
               if (var15.a.g() > (float)var6.d()) {
                  if (var15.a.g() - var15.a.i() > (float)var6.d()) {
                     var15.a.b(var15.a.g() - var15.a.i());
                  } else {
                     var15.a.b((float)var6.d());
                  }
               }

               ++var14;
            }
         case 8:
            var13 = var0.E().b((Integer)var19.get(var11)).o();
            if (var13.g < 0.0D && var13.g > -4.71238898038469D && var19.size() > 2) {
               var13.a.a(var13.a.f() + var13.a.h() / 2.0F);
            }

            if (var13.a.g() > (float)var6.d()) {
               if (var13.a.g() - var13.a.i() > (float)var6.d()) {
                  var13.a.b(var13.a.g() - var13.a.i());
               } else {
                  var13.a.b((float)var6.d());
               }
            }

            for(var14 = var11 - 1; var14 >= 0; --var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.f() - var15.a.l());
               var15.a.a(var15.a.f() - (var16 + var7));
               var13 = var15;
            }

            if (var11 >= 2) {
               var13 = var0.E().b((Integer)var19.get(var19.size() - 1)).o();
               var21 = 0.0F;
               var15 = var0.E().b((Integer)var19.get(var11 - 1)).o();
               var21 = var15.a.g() - (float)var6.d();
               var21 /= (float)(var11 - 1);
               var13 = var0.E().b((Integer)var19.get(0)).o();

               for(var22 = 1; var22 < var11; ++var22) {
                  var17 = var0.E().b((Integer)var19.get(var22)).o();
                  var18 = Math.abs(var13.a.g() - var17.a.m());
                  if (var18 < var21) {
                     var17.a.b(var17.a.g() - (var18 + var7));
                  } else if (var21 > 0.0F) {
                     var17.a.b(var17.a.g() - var21);
                  }

                  var13 = var17;
               }
            }

            var13 = var0.E().b((Integer)var19.get(var11)).o();

            for(var14 = var11 + 1; var14 < var19.size(); ++var14) {
               var15 = var0.E().b((Integer)var19.get(var14)).o();
               var16 = Math.abs(var13.a.l() - var15.a.f());
               var15.a.a(var15.a.f() + var16 + var7);
               var13 = var15;
            }

            if (var19.size() - (var11 + 1) >= 2) {
               var13 = var0.E().b((Integer)var19.get(var19.size() - 1)).o();
               var21 = 0.0F;
               var15 = var0.E().b((Integer)var19.get(var11 + 1)).o();
               var21 = var15.a.g() - (float)var6.d();
               var21 /= (float)(var11 - 1);

               for(var22 = var19.size() - 2; var22 > var11; --var22) {
                  var17 = var0.E().b((Integer)var19.get(var22)).o();
                  var18 = Math.abs(var13.a.g() - var17.a.m());
                  if (var18 < var21) {
                     var17.a.b(var17.a.g() - (var18 + var7));
                  } else if (var21 > 0.0F) {
                     var17.a.b(var17.a.g() - var21);
                  }

                  var13 = var17;
               }
            }
         }

         for(var14 = 0; var14 < var19.size(); ++var14) {
            var13 = var0.E().b((Integer)var19.get(var14)).o();
            if (var13.a.f() < (float)var6.c()) {
               var13.a.a((float)var6.c());
            }

            if (var13.a.g() < (float)var6.d()) {
               var13.a.b((float)var6.d());
            }

            if (var13.a.l() > (float)var6.e()) {
               var13.a.a((float)var6.e() - var13.a.h());
            }

            if (var13.a.m() > (float)var6.f()) {
               var13.a.b((float)var6.f() - var13.a.i());
            }
         }

      }
   }

   private static boolean a(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zq var1, float var2) {
      var0 = new com.aspose.cells.b.a.b.zq(var0.f(), var0.g(), var0.h(), var0.i());
      var1 = new com.aspose.cells.b.a.b.zq(var1.f(), var1.g(), var1.h(), var1.i());
      if (var0.h() != 0.0F && var0.i() != 0.0F && var0.h() != 0.0F && var0.i() != 0.0F) {
         var0.a(var2 / 2.0F, var2 / 2.0F);
         var1.a(var2 / 2.0F, var2 / 2.0F);
         if ((var1.j() >= var0.j() && var1.j() <= var0.l() || var1.l() >= var0.j() && var1.l() <= var0.l()) && (var1.m() >= var0.k() && var1.m() <= var0.m() || var1.k() >= var0.k() && var1.k() <= var0.m())) {
            return true;
         } else {
            return (var0.j() >= var1.j() && var0.j() <= var1.l() || var0.l() >= var1.j() && var0.l() <= var1.l()) && (var0.m() >= var1.k() && var0.m() <= var1.m() || var0.k() >= var1.k() && var0.k() <= var1.m());
         }
      } else {
         return false;
      }
   }

   private static ArrayList a(zbcq var0, com.aspose.cells.b.a.b.zp var1) {
      return a(var0, zbuk.b(var1));
   }

   private static ArrayList a(zbcq var0, com.aspose.cells.b.a.b.zq var1) {
      float var2 = b;
      zjg var3 = var0.E();
      ArrayList var4 = new ArrayList();

      int var5;
      for(var5 = 0; var5 < var3.getCount(); ++var5) {
         zpu var6 = var3.b(var5).o();
         if (var6.j() == 0 && var6.a.h() != 0.0F && var6.a.i() != 0.0F) {
            ArrayList var7 = new ArrayList();
            boolean var8 = false;

            for(int var9 = 0; var9 < var3.getCount(); ++var9) {
               zpu var10 = var3.b(var9).o();
               if (var10.j() == 0 && var10.a.h() != 0.0F && var10.a.i() != 0.0F && var5 != var9) {
                  if (var6.a().d().g()) {
                     var2 = b;
                  } else {
                     var2 = -4.0F;
                  }

                  if (a(var6.a, var10.a, var2)) {
                     var8 = true;
                     com.aspose.cells.b.a.a.ze.a(var7, (Object)var9);
                  }
               }
            }

            if (var8) {
               com.aspose.cells.b.a.a.ze.a(var7, (Object)var5);
               Collections.sort(var7);
               com.aspose.cells.b.a.a.ze.a(var4, (Object)var7);
            }
         }
      }

      for(var5 = 0; var5 < var4.size(); ++var5) {
         ArrayList var11 = (ArrayList)var4.get(var5);

         for(int var12 = var5 + 1; var12 < var4.size(); ++var12) {
            ArrayList var13 = (ArrayList)var4.get(var12);
            if (var11.size() <= var13.size()) {
               if (a(var11, var13)) {
                  var4.remove(var5);
                  --var5;
                  break;
               }
            } else if (a(var13, var11)) {
               var4.remove(var12);
               --var12;
            }
         }
      }

      return var4;
   }

   private static boolean a(ArrayList var0, ArrayList var1) {
      for(int var2 = 0; var2 < var0.size(); ++var2) {
         if (!var1.contains(var0.get(var2))) {
            return false;
         }
      }

      return true;
   }

   private static double a(double var0, double var2) {
      return var2 == 0.0D ? 0.0D : Math.abs(var0) / var2 * 360.0D;
   }

   static com.aspose.cells.b.a.b.zq a(com.aspose.cells.b.a.b.zq var0, double var1, double var3) {
      com.aspose.cells.b.a.b.a.ze var5 = new com.aspose.cells.b.a.b.a.ze();
      var5.b(var0.f(), var0.g(), var0.h(), var0.i(), (float)var1, (float)var3);
      var5.a(new com.aspose.cells.b.a.b.zm(Color.getBlack(), 1.0F));
      return com.aspose.cells.a.c.zn.a(var5);
   }

   static com.aspose.cells.b.a.b.zt a(zn var0, zbcs var1, int var2, int var3, double var4, float var6, float var7, double var8) throws Exception {
      zbcq var10 = var1.c(var2);
      zig var11 = var10.v();
      zje var12 = var10.E().b(var3);
      if (var12 == null) {
         var12 = var10.u();
      } else if (var12.y() || var12.w() == 3 && var12.a()) {
         return new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
      }

      int var13 = var10.ag();
      zbp var14;
      ArrayList var15;
      if (var13 == 1) {
         var14 = var11.e();
         var15 = var11.z().c();
      } else {
         var14 = var11.g();
         var15 = var11.z().d();
      }

      zpu var16 = var12.o();
      String var17 = var10.i();
      boolean var18 = var16.q();
      if (var16.f()) {
         var18 = true;
      }

      String var19 = var16.f() ? "" : var16.p();
      var18 = true;
      String var20;
      boolean var21;
      if (var18) {
         var19 = var3 >= 0 && var3 < var15.size() ? ((zfp)var15.get(var3)).c() : "";
         var21 = var3 >= 0 && var3 < var15.size() ? ((zfp)var15.get(var3)).b() : false;
         var20 = var3 >= 0 && var3 < var14.l.size() ? zpw.a(var11.al(), var14.l.get(var3), var19, var21) : "Other";
      } else {
         var20 = var3 == -1 ? "Other" : zpw.a(var11.al(), var14.l.get(var3), var19, var16.d());
      }

      var21 = var16.q();
      if (var16.f()) {
         var21 = true;
      }

      String var22 = var16.f() ? "" : var16.p();
      String var23;
      if (var21) {
         var23 = var3 == -1 ? zpw.a(var11.al(), var8, var22, var16.r()) : zpw.a(var11.al(), var12.v(), var12.z(), var12.A());
      } else {
         var23 = var3 == -1 ? zpw.a(var11.al(), var8, var22, var16.r()) : zpw.a(var11.al(), var12.v(), var22, var16.r());
      }

      String var24;
      String var25;
      if (var16.q()) {
         var24 = zpw.a(var11.al(), var4, "0%", false);
      } else {
         var25 = "".equals(var16.p()) ? "0%" : var16.p();
         var24 = zpw.a(var11.al(), var4, var25, var16.r());
      }

      var25 = var16.l();
      com.aspose.cells.b.a.b.zg var26 = var16.a().h();
      int var27 = var16.m();
      int var28 = var16.n();
      int var29 = var16.o();
      com.aspose.cells.b.a.b.zt var30 = new com.aspose.cells.b.a.b.zt((float)var16.x(), (float)var16.z());
      String var31 = "";
      if (var16.s() == null) {
         if (var16.h()) {
            var31 = var31 + var17;
         }

         if (var16.d()) {
            if (!"".equals(var31)) {
               var31 = var31 + var25;
            }

            var31 = var31 + var20;
         }

         if (var16.g()) {
            if (!"".equals(var31)) {
               var31 = var31 + var25;
            }

            var31 = var31 + var23;
         }

         if (var16.f()) {
            if (!"".equals(var31)) {
               var31 = var31 + var25;
            }

            var31 = var31 + var24;
         }
      } else {
         if (var16.v()) {
            for(int var41 = 0; var41 < var16.u().getCount(); ++var41) {
               zahp var43 = var16.u().a(var41);
               if (var43.a().indexOf("[SERIES NAME]") >= 0) {
                  var43.a(com.aspose.cells.b.a.zv.a(var43.a(), "[SERIES NAME]", var17));
               } else if (var43.a().indexOf("[CATEGORY NAME]") >= 0) {
                  var43.a(com.aspose.cells.b.a.zv.a(var43.a(), "[CATEGORY NAME]", var20));
               } else if (var43.a().indexOf("[VALUE]") >= 0) {
                  var43.a(com.aspose.cells.b.a.zv.a(var43.a(), "[VALUE]", var23));
               } else if (var43.a().indexOf("[PERCENTAGE]") >= 0) {
                  var43.a(com.aspose.cells.b.a.zv.a(var43.a(), "[PERCENTAGE]", var24));
               }
            }

            zbai var42 = new zbai();
            var42.a(1);
            var42.b(1);
            com.aspose.cells.b.a.b.zq var44 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, var6, (float)var11.ak().f() * 0.5F);
            zbaq var45 = new zbaq(var44, var42, var16.u(), var16.a().h());
            com.aspose.cells.b.a.b.zq var35 = var45.a(var16.a().a().ap());
            com.aspose.cells.b.a.b.zs var36 = new com.aspose.cells.b.a.b.zs((int)((double)var35.h() + 0.5D), (int)((double)var35.i() + 0.5D));
            var16.c = var36;
            double var37 = (double)var16.m() * 3.141592653589793D / 180.0D;
            int var39 = (int)((double)var36.b() * Math.abs(Math.cos(var37)) + (double)var36.c() * Math.abs(Math.sin(var37)) + 0.5D);
            int var40 = (int)((double)var36.b() * Math.abs(Math.sin(var37)) + (double)var36.c() * Math.abs(Math.cos(var37)) + 0.5D);
            return new com.aspose.cells.b.a.b.zt((float)var39, (float)var40);
         }

         var31 = var16.s();
      }

      com.aspose.cells.b.a.b.zt var32 = new com.aspose.cells.b.a.b.zt(var6, var7);
      com.aspose.cells.b.a.b.zs var33 = zbsq.b(var0, var31, var27, var26, var32, var28, var29);
      if ("".equals(var31)) {
         return new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
      } else {
         com.aspose.cells.b.a.b.zt var34;
         if (var16.e()) {
            var34 = new com.aspose.cells.b.a.b.zt((float)var33.b() + var30.b(), (float)var33.c());
         } else {
            var34 = new com.aspose.cells.b.a.b.zt((float)var33.b(), (float)var33.c());
         }

         if (var16.e()) {
            var34.a(var34.b() + (float)(2 * zpw.a));
         }

         var34.b(var34.c() + (float)(2 * zpw.a));
         return var34;
      }
   }

   static void a(zn var0, zig var1, int var2, int var3, double var4, com.aspose.cells.b.a.b.zq var6, double var7) throws Exception {
      com.aspose.cells.b.a.b.zq[] var9 = new com.aspose.cells.b.a.b.zq[]{var6};
      var1.a(var9);
      var6 = var9[0];
      zbcq var10 = var1.z().c(var2);
      zje var11 = var10.E().b(var3);
      if (var11 == null) {
         var11 = var10.u();
      } else if (var11.y() || var11.w() == 3 && var11.a()) {
         return;
      }

      int var12 = var10.ag();
      zbp var13;
      ArrayList var14;
      if (var12 == 1) {
         var13 = var1.e();
         var14 = var1.z().c();
      } else {
         var13 = var1.g();
         var14 = var1.z().d();
      }

      zpu var15 = var11.o();
      String var16 = var10.i();
      boolean var17 = var15.q();
      if (var15.f()) {
         var17 = true;
      }

      String var18 = var15.f() ? "" : var15.p();
      boolean var20 = false;
      var17 = true;
      String var19;
      boolean var21;
      if (var17) {
         var18 = var3 >= 0 && var3 < var14.size() ? ((zfp)var14.get(var3)).c() : "";
         var21 = var3 >= 0 && var3 < var14.size() ? ((zfp)var14.get(var3)).b() : false;
         var19 = var3 >= 0 && var3 < var13.l.size() ? zpw.a(var1.al(), var13.l.get(var3), var18, var21) : "Other";
         if (var3 >= 0 && var3 < var13.l.size()) {
            var20 = zpw.a(var13.l.get(var3), var18);
         }
      } else {
         var19 = var3 == -1 ? "Other" : zpw.a(var1.al(), var13.l.get(var3), var18, var15.d());
      }

      var21 = var15.q();
      if (var15.f()) {
         var21 = true;
      }

      String var22 = var15.f() ? "" : var15.p();
      boolean var24 = false;
      String var23;
      if (var21) {
         var23 = var3 == -1 ? zpw.a(var1.al(), var7, var22, var15.r()) : zpw.a(var1.al(), var11.v(), var11.z(), var11.A());
         if (var3 != -1) {
            var24 = zpw.a((Object)var11.v(), (String)var11.z());
         }
      } else {
         var23 = var3 == -1 ? zpw.a(var1.al(), var7, var22, var15.r()) : zpw.a(var1.al(), var11.v(), var22, var15.r());
      }

      var4 += var15.i;
      String var25;
      String var26;
      if (var15.q()) {
         var25 = zpw.a(var1.al(), var4, "0%", false);
      } else {
         var26 = "".equals(var15.p()) ? "0%" : var15.p();
         var25 = zpw.a(var1.al(), var4, var26, var15.r());
      }

      var26 = var15.l();
      com.aspose.cells.b.a.b.zg var27 = var15.a().h();
      Color var28 = var15.a().j();
      int var29 = var15.m();
      int var30 = var15.n();
      int var31 = var15.o();
      com.aspose.cells.b.a.b.zt var32 = new com.aspose.cells.b.a.b.zt((float)var15.x(), (float)var15.z());
      var15.a().b = new com.aspose.cells.b.a.b.zp((int)var6.f(), (int)var6.g(), (int)var6.h(), (int)var6.i());
      var15.a().a = var15.a().b;
      if (var15.a().a.e() > 0 && var15.a().a.f() > 0) {
         var15.a().c().a(var15.a().a);
         var15.a().d().a(var15.a().a);
      }

      int var33 = var15.e() ? (int)(var6.f() + (float)zpw.a) : (int)var6.f();
      var33 += zpw.a;
      int var34 = (int)var6.g() + zpw.a;
      int var35 = var15.e() ? (int)(var6.h() - (float)(2 * zpw.a)) : (int)var6.h();
      int var36 = (int)var6.i() - 2 * zpw.a;
      if (var15.e()) {
         com.aspose.cells.b.a.b.zq var37 = new com.aspose.cells.b.a.b.zq(var6.f() + (float)zpw.a, var6.g() + (float)zpw.a, var32.b(), var32.c());
         zald.a(var0, var37, var10, var3);
         var33 += (int)var32.b();
         var35 -= (int)var32.b();
      }

      String var40 = "";
      if (var15.s() == null) {
         if (var15.h()) {
            var40 = var40 + var16;
         }

         if (var15.d()) {
            if (!"".equals(var40)) {
               var40 = var40 + var26;
            }

            var40 = var40 + var19;
         }

         if (var15.g()) {
            if (!"".equals(var40)) {
               var40 = var40 + var26;
            }

            var40 = var40 + var23;
         }

         if (var15.f()) {
            if (!"".equals(var40)) {
               var40 = var40 + var26;
            }

            var40 = var40 + var25;
         }
      } else {
         if (var15.v()) {
            zbai var41 = new zbai();
            var41.a(zbsq.a(var15.n()));
            var41.b(zbsq.a(var15.o()));
            zbaq var39 = new zbaq(var6, var41, var15.u(), var15.a().h());
            var39.b(var0);
            return;
         }

         var40 = var15.s();
      }

      if (!"".equals(var40)) {
         com.aspose.cells.b.a.b.zp var38 = new com.aspose.cells.b.a.b.zp(var33, var34, var35, var36);
         if (var20 || var24) {
            var28 = Color.getRed();
         }

         a(var0, var15, var38, var40, var29, var27, var28, var30, var31);
      }

   }

   public static void a(zn var0, zpu var1, com.aspose.cells.b.a.b.zp var2, String var3, int var4, com.aspose.cells.b.a.b.zg var5, Color var6, int var7, int var8) {
      boolean var9 = false;
      int var10 = var0.j();
      if (var1.a().a().i().c().i() && var1.a().c().i() && (var1.j() == 4 || var1.j() == 9) && var0.j() != 4) {
         var9 = true;
         var0.b(4);
      }

      com.aspose.cells.b.a.b.zv var11 = new com.aspose.cells.b.a.b.zv(com.aspose.cells.b.a.b.zv.c());
      var11.a(zbsq.a(var7));
      var11.c(zbsq.a(var8));
      com.aspose.cells.b.a.b.zu var12 = new com.aspose.cells.b.a.b.zu(var6);
      switch(Math.abs(var4)) {
      case 0:
         var0.a(var3, var5, var12, (com.aspose.cells.b.a.b.zp)var2, var11);
         break;
      case 90:
         var0.b((float)(var2.g() + var2.e() / 2), (float)(var2.h() + var2.f() / 2));
         var0.a((float)(-var4));
         var2 = new com.aspose.cells.b.a.b.zp(-var2.f() / 2, -var2.e() / 2, var2.f(), var2.e());
         var0.a(var3, var5, var12, (com.aspose.cells.b.a.b.zp)var2, var11);
         var0.d();
         break;
      default:
         double var13 = Math.sqrt(Math.pow((double)var2.e(), 2.0D) + Math.pow((double)var2.f(), 2.0D));
         var11.b(4096);
         com.aspose.cells.b.a.b.zt var15 = var0.a(var3, var5, (int)var13, var11);
         var0.b((float)(var2.g() + var2.e() / 2), (float)(var2.h() + var2.f() / 2));
         var0.a((float)(-var4));
         com.aspose.cells.b.a.b.zq var16 = new com.aspose.cells.b.a.b.zq(-var15.b() / 2.0F, -var15.c() / 2.0F, var15.b(), var15.c());
         var0.a(var3, var5, var12, (com.aspose.cells.b.a.b.zq)var16, var11);
         var0.d();
      }

      var12.h();
      if (var9 && var0.j() != var10) {
         var0.b(var10);
      }

   }

   public static void a(zjg var0) {
      double var1 = 0.0D;

      for(int var3 = 0; var3 < var0.getCount(); ++var3) {
         var1 += Math.abs(var0.a(var3).v());
      }

      if (var1 != 0.0D) {
         double var24 = 0.0D;
         double var5 = 1.0D;
         int var7 = -1;
         int var8 = -1;
         int var9 = 0;

         double var12;
         for(int var10 = 0; var10 < var0.getCount(); ++var10) {
            var0.b(var10);
            var12 = Math.abs(var0.a(var10).v());
            double var14 = var12 / var1 * 100.0D;
            var9 += (int)(var14 + 0.5D);
            double var16 = var14 - (double)((int)var14);
            if (var16 < 0.5D && var16 > var24) {
               var24 = var16;
               var7 = var10;
            }

            if (var16 > 0.5D && var16 < var5) {
               var5 = var16;
               var8 = var10;
            }
         }

         double var25 = 0.0D;
         var12 = 1.0D;
         int var26 = -1;
         int var15 = -1;
         if (var9 < 99 || var9 > 101) {
            for(int var27 = 0; var27 < var0.getCount(); ++var27) {
               var0.b(var27);
               double var18 = Math.abs(var0.a(var27).v());
               double var20 = var18 / var1 * 100.0D;
               var9 += (int)(var20 + 0.5D);
               double var22 = var20 - (double)((int)var20);
               if (var27 != var7 && var22 <= var24 && var22 > var25) {
                  var25 = var22;
                  var26 = var27;
               }

               if (var27 != var8 && var22 >= var5 && var22 < var12) {
                  var12 = var22;
                  var15 = var27;
               }
            }
         }

         zpu var17;
         zje var28;
         String var29;
         if (var7 != -1 && var9 < 100) {
            var28 = var0.b(var7);
            var17 = var28.o();
            var29 = "";
            if (var17.q()) {
               var29 = "0%";
            } else {
               var29 = "".equals(var17.p()) ? "0%" : var17.p();
            }

            if ("0%".equals(var29)) {
               var17.i = (1.0D - var24) / 100.0D;
            }
         }

         if (var26 != -1 && var9 < 99) {
            var28 = var0.b(var26);
            var17 = var28.o();
            var29 = "";
            if (var17.q()) {
               var29 = "0%";
            } else {
               var29 = "".equals(var17.p()) ? "0%" : var17.p();
            }

            if ("0%".equals(var29)) {
               var17.i = (1.0D - var25) / 100.0D;
            }
         }

         if (var8 != -1 && var9 > 100) {
            var28 = var0.b(var8);
            var17 = var28.o();
            var29 = "";
            if (var17.q()) {
               var29 = "0%";
            } else {
               var29 = "".equals(var17.p()) ? "0%" : var17.p();
            }

            if ("0%".equals(var29)) {
               var17.i = (var5 - 1.0D) / 100.0D;
            }
         }

         if (var15 != -1 && var9 > 101) {
            var28 = var0.b(var15);
            var17 = var28.o();
            var29 = "";
            if (var17.q()) {
               var29 = "0%";
            } else {
               var29 = "".equals(var17.p()) ? "0%" : var17.p();
            }

            if ("0%".equals(var29)) {
               var17.i = (var12 - 1.0D) / 100.0D;
            }
         }

      }
   }
}
